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 Oct 15, 2021
1 parent 9ceff48 commit 18c0f66
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ReactCodeInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class ReactCodeInput extends Component {

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

Expand Down

0 comments on commit 18c0f66

Please sign in to comment.