chatscope / chatscope/chat-ui-kit-react
the input message show value when paste the same value continuously but the state of value not update
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
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
` {
if (val.length > 4) {
setInput(val.substring(0, 4));
} else setInput(val);
}}
/>
`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the MessageInput component and reproduce the issue using the controlled value and onChange example, pasting the same overlong text repeatedly. Trace how the displayed input value is handled when the callback keeps a truncated state value. Done means the displayed text remains consistent with the controlled state and length limit during repeated pastes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100