What seems to be the problem:
wire.click.stop
is not working.
here is my code
<ul>
@foreach ($materials as $material)
@if($loop->index == $current)
<li wire:click.stop="currentMaterial({{ $material['id'] }} , {{ $loop->index }})" class="is-active">
<a>{{ $material['short_name'] }}</a>
</li>
@else
<li wire:click="currentMaterial({{ $material['id'] }} , {{ $loop->index }})">
<a>{{ $material['short_name'] }}</a>
</li>
@endif
@endforeach
</ul>
Steps to Reproduce:
When the component rendered first time the click event does not stop the ajax call and re render the component. if i click on that link again then it shows this error.
Uncaught TypeError: Cannot read property 'match' of null
Are you using the latest version of Livewire: Yes