From 8b3ad039557cd13dbef2c1b3e56fb9a4664503cd Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Fri, 29 Mar 2019 08:44:48 -0600 Subject: [PATCH] Pass value, not object, to onPress in updateIsActiveIndex This caused issues in my `onPress` handlers that were expecting the value of the button, not the button object. --- lib/SimpleRadioButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SimpleRadioButton.js b/lib/SimpleRadioButton.js index ebc0fd2..f9ec11b 100644 --- a/lib/SimpleRadioButton.js +++ b/lib/SimpleRadioButton.js @@ -41,7 +41,7 @@ export default class RadioForm extends React.Component { updateIsActiveIndex(index) { this.setState({ is_active_index: index }); - this.props.onPress(this.props.radio_props[index], index) + this.props.onPress(this.props.radio_props[index].value, index) } _renderButton(obj, i) {