01-07-2019 19:59 - edited 01-08-2019 10:39
01-07-2019 19:59 - edited 01-08-2019 10:39
Hi, I have a selection in the settings index.jsx, and I want the URL text input to only be available when the third selection option is chosen (option C).
Here is my relevant code:
<Select settingsKey="SourceSelect" label="Data Source" options={[ {name:"a"}, {name:"b"}, {name:"c"} ]} /> <TextInput settingsKey="URL" label="Enter URL" defaultValue="http://127.0.0.1" />
Any help appreciated.
Thanks!
01-08-2019 10:11 - edited 01-08-2019 10:37
01-08-2019 10:11 - edited 01-08-2019 10:37
I tried the following but the text remains unclickable no matter which option is selected:
<TextInput settingsKey="URL" label="Enter URL" defaultValue="http://127.0.0.1" disabled={!(props.settings.SourceSelect === "c")} />