feat(ui): focus in textarea after inserting placeholder

This commit is contained in:
psychedelicious 2024-08-16 10:14:25 +10:00
parent 39c7ec3cd9
commit 3fb4e3050c

View File

@ -39,6 +39,8 @@ export const StylePresetPromptField = (props: Props) => {
} else {
field.onChange(value + PRESET_PLACEHOLDER);
}
textareaRef.current?.focus();
}, [value, field, textareaRef]);
const isPromptPresent = useMemo(() => value?.includes(PRESET_PLACEHOLDER), [value]);