Skip to content

onChange returning wrong value #24

@harshalijain

Description

@harshalijain

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions