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 f6c9bd7 commit 49b150e
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 @@ -54,6 +54,7 @@ class ReactCodeInput extends Component {
}
this.setState({
value: nextProps.value,
input: getInputArray(nextProps),
});
}

Expand Down

0 comments on commit 49b150e

Please sign in to comment.