prevents making unnecessary requests for global search

This commit is contained in:
Sevan Nerse 2021-06-25 13:14:57 +03:00
parent 1b7f7ac34e
commit c68b1c17d1

View File

@ -36,7 +36,9 @@
@push('scripts_end')
<script type="text/javascript">
$(window).click(function() {
Livewire.emit('resetKeyword');
if (Livewire.components.getComponentsByName('common.search')[0].data.results.length > 0) {
Livewire.emit('resetKeyword');
}
});
</script>
@endpush