mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: type-script new change (#5159)
### What problem does this PR solve? ``` fixed type-script on MessageInput change to TextArea ``` _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -284,7 +284,7 @@ export const useScrollToBottom = (messages?: unknown) => {
|
||||
export const useHandleMessageInputChange = () => {
|
||||
const [value, setValue] = useState('');
|
||||
|
||||
const handleInputChange: ChangeEventHandler<HTMLInputElement> = (e) => {
|
||||
const handleInputChange: ChangeEventHandler<HTMLTextAreaElement> = (e) => {
|
||||
const value = e.target.value;
|
||||
const nextValue = value.replaceAll('\\n', '\n').replaceAll('\\t', '\t');
|
||||
setValue(nextValue);
|
||||
|
||||
Reference in New Issue
Block a user