mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): focus in textarea after inserting placeholder
This commit is contained in:
parent
39c7ec3cd9
commit
3fb4e3050c
@ -39,6 +39,8 @@ export const StylePresetPromptField = (props: Props) => {
|
|||||||
} else {
|
} else {
|
||||||
field.onChange(value + PRESET_PLACEHOLDER);
|
field.onChange(value + PRESET_PLACEHOLDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
textareaRef.current?.focus();
|
||||||
}, [value, field, textareaRef]);
|
}, [value, field, textareaRef]);
|
||||||
|
|
||||||
const isPromptPresent = useMemo(() => value?.includes(PRESET_PLACEHOLDER), [value]);
|
const isPromptPresent = useMemo(() => value?.includes(PRESET_PLACEHOLDER), [value]);
|
||||||
|
Loading…
Reference in New Issue
Block a user