Skip to content

Commit 66d7a8d

Browse files
committed
Update state.value + state.input on props change 40818419#69 40818419#129
makes it possible to reset ReactCodeInput’s internal state and the values it renders in its inputs by passing in an updated this.props.value
1 parent 6ed67e4 commit 66d7a8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ReactCodeInput.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ class ReactCodeInput extends Component {
4848
}
4949

5050
this.setState({
51-
value: nextProps.value,
51+
input: getInputArrayFromProps(nextProps),
52+
value: getValueFromProps(nextProps),
5253
});
5354
}
5455

0 commit comments

Comments
 (0)