disabled button still clickable

I'm using a button blade component, but disabling it makes the appearance change but not the interactivity. The button looks to be disabled, but when you click on it, it still triggers the modal.
<x-filament::modal id="myModal" width="6xl">
<x-slot name="trigger">
@if ($sum != 0)
<x-filament::icon-button size="lg" icon="heroicon-o-check-circle" class="text-gray-600" :disabled="true" style="margin-left: -14px; margin-right: 0px;" />
@else
<x-filament::icon-button size="lg" icon="heroicon-o-check-circle" class="text-green-600 animate-bounce" :disabled="true" style="margin-left: -14px; margin-right: 0px;" />
@endif
</x-slot>
<x-filament::modal id="myModal" width="6xl">
<x-slot name="trigger">
@if ($sum != 0)
<x-filament::icon-button size="lg" icon="heroicon-o-check-circle" class="text-gray-600" :disabled="true" style="margin-left: -14px; margin-right: 0px;" />
@else
<x-filament::icon-button size="lg" icon="heroicon-o-check-circle" class="text-green-600 animate-bounce" :disabled="true" style="margin-left: -14px; margin-right: 0px;" />
@endif
</x-slot>
2 Replies
Jon Mason
Jon MasonOP5mo ago
I've also tried just using disabled not :disabled="true". same result
LeandroFerreira
LeandroFerreira5mo ago
maybe because of slot? 🤔 try to put the button outside the modal and use <x-filament::icon-button @click="$dispatch('open-modal', {id: 'myModal'})" ... />
Want results from more Discord servers?
Add your server