Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Toggle disable settings element

ANSWERED

I am using the example from the Settings API page for the toggle that disables/enables the textInput.

<TextInput
label="Example"
title="Text Input"
settingsKey="textInput"
disabled={!(this.props.settings.toggleTextInput === "true")}
/>
<Toggle
label="Enable Text Input"
settingsKey="toggleTextInput"

 

However when I run the code in the simulator, I get a blank settings page. I have narrowed it down to the "disabled" line as the culprit. Did something change?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Found it -  had to remove the "this" from this.props...

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

Found it -  had to remove the "this" from this.props...

Best Answer
0 Votes

Thanks, we'll get the example clarified

Best Answer
0 Votes