Fixed Left menu livewire event fire issue..
This commit is contained in:
@ -1,6 +1,12 @@
|
||||
<div wire:click.stop id="menu-notifications">
|
||||
<div wire:click.stop id="menu-notifications" class="relative">
|
||||
<input type="text" name="notification_keyword" wire:model.debounce.500ms="keyword" placeholder="{{ trans('general.search_placeholder') }}" class="border-t-0 border-l-0 border-r-0 border-b border-gray-300 bg-transparent text-gray-500 text-sm mb-3 focus:outline-none focus:ring-transparent focus:border-purple placeholder-light-gray js-search-action">
|
||||
|
||||
@if ($keyword)
|
||||
<button type="button" class="absolute ltr:right-2 rtl:left-2 top-2 clear" wire:click="resetKeyword">
|
||||
<span class="material-icons text-sm">close</span>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if ($notifications)
|
||||
<div class="flex justify-end mt-1">
|
||||
<x-tooltip id="notification-all" placement="right" message="Mark as All Read">
|
||||
@ -53,12 +59,6 @@
|
||||
|
||||
@push('scripts_end')
|
||||
<script type="text/javascript">
|
||||
window.addEventListener('click', function() {
|
||||
if (Livewire.components.getComponentsByName('menu.notifications')[0].data.notifications.length > 0) {
|
||||
Livewire.emit('resetKeyword');
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('mark-read', event => {
|
||||
if (event.detail.type == 'notifications') {
|
||||
$.notify(event.detail.message, {
|
||||
|
Reference in New Issue
Block a user