mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🚧 refactor: Attempt Default Preset Fix & Other Changes (#2342)
* fix(useTextarea): trigger SendButton re-render on undo and clearing text * refactor(PresetItems): show pin icon for default preset * fix(ChatRoute): do not use conversation.model for useEffect, do not set default Preset if real model list is not yet fetched
This commit is contained in:
parent
476767355b
commit
334b603247
4 changed files with 23 additions and 15 deletions
|
@ -160,9 +160,11 @@ export default function useTextarea({
|
|||
const isUndo = e.key === 'z' && (e.ctrlKey || e.metaKey);
|
||||
if (isUndo && target.value.trim() === '') {
|
||||
textAreaRef.current?.setRangeText('', 0, textAreaRef.current?.value?.length, 'end');
|
||||
setValue('text', '', { shouldValidate: true });
|
||||
forceResize(textAreaRef);
|
||||
} else if (isUndo) {
|
||||
trimUndoneRange(textAreaRef);
|
||||
setValue('text', '', { shouldValidate: true });
|
||||
forceResize(textAreaRef);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue