-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
We used switch where the initial state set in Redux. but when entered the data and saving in local , If i'm fetching back the details it is not behaving as expected. Below is the code we have written.
<Switch
value={this.state.address.sameas.value === 'N' ? false : true}
switchWidth={50}
switchHeight={25}
buttonWidth={25}
buttonHeight={25}
switchBorderColor={'rgba(0, 0, 0, 1)'}
activeBackgroundColor={'#009669'}
inactiveBackgroundColor={'#888888'}
buttonBorderColor={'rgba(0, 0, 0, 1)'}
buttonBorderWidth={1}
padding={false}
onChangeValue={sameas => {
address.sameas.value = sameas ? 'Y' : 'N';
this.setState({ address});
}}
/>
below is the way setting the state in redux.
sameas: {
value: 'N',
error: '',
enable: true
},
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels