Do not allow empty string filters (#7010)

This commit is contained in:
Kristina 2024-10-22 18:43:57 +04:00 committed by GitHub
parent c7fb3bdb98
commit 6d3fd41f02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,7 +41,10 @@
}
function save () {
filter.value = search ? [search] : []
if (search == null || search === '') {
return
}
filter.value = [search]
onChange(filter)
dispatch('close')
@ -61,5 +64,5 @@
on:change
/>
</div>
<Button shape="filter" label={view.string.Apply} on:click={save} />
<Button shape="filter" label={view.string.Apply} disabled={search === ''} on:click={save} />
</div>