diff --git a/src/components/ui/VnSearchBar.vue b/src/components/ui/VnSearchBar.vue index be15f6c9..214a8cff 100644 --- a/src/components/ui/VnSearchBar.vue +++ b/src/components/ui/VnSearchBar.vue @@ -40,6 +40,11 @@ const search = async () => { query: searchTerm.value ? { search: searchTerm.value } : {} }); + if (!searchTerm.value) { + emit('onSearchError'); + return; + } + if (props.sqlQuery) { data = await jApi.query(props.sqlQuery, { [props.searchField]: searchTerm.value diff --git a/src/pages/Ecomerce/CatalogView.vue b/src/pages/Ecomerce/CatalogView.vue index 4243775f..eea285cb 100644 --- a/src/pages/Ecomerce/CatalogView.vue +++ b/src/pages/Ecomerce/CatalogView.vue @@ -1,7 +1,14 @@