-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I clear already written code? #129
Comments
I'm also curious how to clear text. |
Duplicate: #69 |
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 15, 2021
i made some updates to support this feature request. here’s a very simple example where the reset is triggered by a “Clear” button: function Clearable() {
const [value, setValue] = React.useState(null);
return (
<React.Fragment>
<ReactCodeInput onChange={() => setValue(null)} value={value} />
<button onClick={() => setValue('')}>Clear</button>
</React.Fragment>
);
} you can try it out via |
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 16, 2021
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 16, 2021
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 16, 2021
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Oct 16, 2021
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Jun 22, 2022
…#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
acusti
added a commit
to acusti/react-code-input
that referenced
this issue
Jun 22, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the activation code is wrong, I would like to clear the written code.
I put "value" variable to props.
And set the "value" to "" if the activation code is wrong.
But it's not working.
"value" is working for only first time, seems it works like defaultValue.
Please help me to clear already written code.
Thank you.
The text was updated successfully, but these errors were encountered: