diff --git a/src/lib/components/search/textSearch/index.svelte b/src/lib/components/search/textSearch/index.svelte index 09891a1..bbbf60e 100644 --- a/src/lib/components/search/textSearch/index.svelte +++ b/src/lib/components/search/textSearch/index.svelte @@ -1,7 +1,7 @@ + const submitSearch: SubmitFunction = ({ form, data, action, cancel }) => { + const { name } = Object.fromEntries(data); + if (!disclosureOpen && name?.length === 0) { + toast.send('Please enter a search term', { + duration: 3000, + type: ToastType.ERROR, + dismissible: true + }); + cancel(); + return; + } -