mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: 🐛 handle trigger phrase form submits
This commit is contained in:
parent
8b9c4c62a6
commit
28c28b2fc0
@ -77,9 +77,17 @@ export const TriggerPhrases = () => {
|
|||||||
[updateModel, selectedModelKey, triggerPhrases]
|
[updateModel, selectedModelKey, triggerPhrases]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const onTriggerPhraseAddFormSubmit = useCallback(
|
||||||
|
(e: React.FormEvent<HTMLFormElement>) => {
|
||||||
|
e.preventDefault();
|
||||||
|
addTriggerPhrase();
|
||||||
|
},
|
||||||
|
[addTriggerPhrase]
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex flexDir="column" w="full" gap="5">
|
<Flex flexDir="column" w="full" gap="5">
|
||||||
<form>
|
<form onSubmit={onTriggerPhraseAddFormSubmit}>
|
||||||
<FormControl w="full" isInvalid={Boolean(errors.length)} orientation="vertical">
|
<FormControl w="full" isInvalid={Boolean(errors.length)} orientation="vertical">
|
||||||
<FormLabel>{t('modelManager.triggerPhrases')}</FormLabel>
|
<FormLabel>{t('modelManager.triggerPhrases')}</FormLabel>
|
||||||
<Flex flexDir="column" w="full">
|
<Flex flexDir="column" w="full">
|
||||||
|
Loading…
Reference in New Issue
Block a user