Filament button inside foreach
What I'm trying to do is foreach products from database , each product has a button which opens a modal
The problem is : when I click order in one product , all the products button spinns , and I don't want that .
I have tried to add an ID or something like that , but it does not work .
this is my code :
<div class="group bg-white shadow-sm rounded-xl p-4 mb-4">
...
<x-filament::button outlined class="grid mx-auto mt-3 mb-4 w-96" icon="heroicon-o-shopping-cart" wire:click="openModal" >
Order
</x-filament::button>
<x-filament::modal id="place-order" displayClasses='block'>
..
<x-filament::button icon="heroicon-o-shopping-cart" wire:click="order">
Order
</x-filament::button>
</x-filament::modal>
</div>
2 Replies
If you are on the latest version that’s a bug.