Closed markrickert closed 8 years ago
thank you @markrickert
This creates some weird circular calls. Any idea why ? It only happens if I want to access the value param. I tries using onValueChange but the value parameter of the function handleTest is always undefined and when using onChange some circular calls are getting triggered that don't stop.
The basic Switch component from react works fine with the my code.
handleTest = (value) => {
console.log(value)
}
<GiftedForm.SwitchWidget
key={1000}
title="test"
// onValueChange={(value) => this.handleTest(value)}
onChange={(value) => this.handleTest(value)}
value={this.state.identifier}
/>
Allows a user to specify an
onChange
property for switches.Example usage:
My editor made some whitespace fixes automatically as well. You can view this PR with
?w=1
at the end to get rid of these in the file viewer: https://github.com/FaridSafi/react-native-gifted-form/pull/44/files?w=1