Skip to content
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

the input message show value when paste the same value continuously but the state of value not update #132

Open
dthuyvi opened this issue Oct 31, 2023 · 0 comments

Comments

@dthuyvi
Copy link

dthuyvi commented Oct 31, 2023

This is the sample for this case when I want to limit the length input, but when I copy the long text and paste it to this field continuously, the long text will be shown in input message although the state is not updated
<MessageInput placeholder="Type message here" onSend={handleSendMessage} attachButton={false} autoFocus sendDisabled={typing} sendOnReturnDisabled={typing} value={input} onChange={(val) => { if (val.length > 4) { setInput(val.substring(0, 4)); } else setInput(val); }} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant