Skip to content

Commit

Permalink
Update state.value + state.input on props change 40818419#69 40818419…
Browse files Browse the repository at this point in the history
…#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
  • Loading branch information
acusti committed Jun 22, 2022
1 parent 6ed67e4 commit 66d7a8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ReactCodeInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class ReactCodeInput extends Component {
}

this.setState({
value: nextProps.value,
input: getInputArrayFromProps(nextProps),
value: getValueFromProps(nextProps),
});
}

Expand Down

0 comments on commit 66d7a8d

Please sign in to comment.