react-native-shine-button icon indicating copy to clipboard operation
react-native-shine-button copied to clipboard

onChange returning wrong value

Open harshalijain opened this issue 5 years ago • 0 comments

onChange is always returning false. Looked into the JS code,found this

_onChange = event => {
   let value = false;
   if (event.nativeEvent.value === "YES") value = true;

   this.props.onChange && this.props.onChange(value);

   this._shineButton.setNativeProps({ on: event.nativeEvent.value });
 };

After debugging, I found out that event.nativeEvent.value returns boolean 'true' or 'false' according to the action performed. But because of the above condition, value is always set to 'false'

harshalijain avatar Nov 22 '19 05:11 harshalijain