Closed CarusonSan closed 3 years ago
Hello,
Following code as set out in example does not re-render the button or update the label.
Code below: <ModalSelector style={styles.modalSelector} data={CategoryData} initValue="Select Category" onChange={(itemValue) => this.setState( {category: ${itemValue.label}}, console.log('Category changed to: ', itemValue.key), ) } />
<ModalSelector style={styles.modalSelector} data={CategoryData} initValue="Select Category" onChange={(itemValue) => this.setState( {category: ${itemValue.label}}, console.log('Category changed to: ', itemValue.key), ) } />
This is for both iOS and Android.
This was fixed as the initValue cannot be set to a string. If a custom value is needed, use a value from state
Hello,
Following code as set out in example does not re-render the button or update the label.
Code below:
<ModalSelector style={styles.modalSelector} data={CategoryData} initValue="Select Category" onChange={(itemValue) => this.setState( {category: ${itemValue.label}}, console.log('Category changed to: ', itemValue.key), ) } />
This is for both iOS and Android.