Commit cb7b23d2 authored by joseph izang's avatar joseph izang

fix uncontrolled input react error for localplugin form

parent 64cf9f6a
...@@ -96,7 +96,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor ...@@ -96,7 +96,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
<input <input
className="form-control" className="form-control"
onChange={e => setName(e.target.value)} onChange={e => setName(e.target.value)}
value={ name || defaultPlugin.name } value={ name }
id="plugin-name" id="plugin-name"
data-id="localPluginName" data-id="localPluginName"
placeholder="Should be camelCase" /> placeholder="Should be camelCase" />
...@@ -106,7 +106,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor ...@@ -106,7 +106,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
<input <input
className="form-control" className="form-control"
onChange={e => setDisplayName(e.target.value)} onChange={e => setDisplayName(e.target.value)}
value={ displayName || defaultPlugin.displayName } value={ displayName }
id="plugin-displayname" id="plugin-displayname"
data-id="localPluginDisplayName" data-id="localPluginDisplayName"
placeholder="Name in the header" /> placeholder="Name in the header" />
...@@ -116,7 +116,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor ...@@ -116,7 +116,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
<input <input
className="form-control" className="form-control"
onChange={e => setMethods(e.target.value)} onChange={e => setMethods(e.target.value)}
value={methods || defaultPlugin.methods} value={ methods }
id="plugin-methods" id="plugin-methods"
data-id="localPluginMethods" data-id="localPluginMethods"
placeholder="Name in the header" /> placeholder="Name in the header" />
...@@ -127,7 +127,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor ...@@ -127,7 +127,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
<input <input
className="form-control" className="form-control"
onChange={e => setUrl(e.target.value)} onChange={e => setUrl(e.target.value)}
value={ url || defaultPlugin.url } value={ url }
id="plugin-url" id="plugin-url"
data-id="localPluginUrl" data-id="localPluginUrl"
placeholder="ex: https://localhost:8000" /> placeholder="ex: https://localhost:8000" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment