Merge pull request #2139 from sevannerse/fix-livewire-search
Prevents making unnecessary requests for global search
This commit is contained in:
commit
78d27fa9cf
@ -36,7 +36,9 @@
|
|||||||
@push('scripts_end')
|
@push('scripts_end')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(window).click(function() {
|
$(window).click(function() {
|
||||||
|
if (Livewire.components.getComponentsByName('common.search')[0].data.results.length > 0) {
|
||||||
Livewire.emit('resetKeyword');
|
Livewire.emit('resetKeyword');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
Loading…
x
Reference in New Issue
Block a user