mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): clear pending trigger phrase immediately
If we don't clear it, there's an awkward flash of error state as the mutation completes.
This commit is contained in:
parent
fe8e391aad
commit
4077dfe0c3
@ -56,11 +56,12 @@ export const TriggerPhrases = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
setPhrase('');
|
||||
|
||||
await updateModel({
|
||||
key: selectedModelKey,
|
||||
body: { trigger_phrases: [...triggerPhrases, phrase] },
|
||||
}).unwrap();
|
||||
setPhrase('');
|
||||
}, [updateModel, selectedModelKey, phrase, triggerPhrases]);
|
||||
|
||||
const removeTriggerPhrase = useCallback(
|
||||
|
Loading…
Reference in New Issue
Block a user