fix: disallow creating empty tag
This commit is contained in:
@@ -47,7 +47,9 @@ export const AutocompleteTagInput = observer(({ appState }: Props) => {
|
|||||||
|
|
||||||
const onFormSubmit = async (event: Event) => {
|
const onFormSubmit = async (event: Event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
await appState.noteTags.createAndAddNewTag();
|
if (autocompleteSearchQuery !== '') {
|
||||||
|
await appState.noteTags.createAndAddNewTag();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onKeyDown = (event: KeyboardEvent) => {
|
const onKeyDown = (event: KeyboardEvent) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user