What seems to be the problem:
How can disable 2 buttons when I click on 1 of them?
I have a form with 2 actions. “Save” and “Save and make live”. When either is clicked I want to disable them both.
Is there a way to get this automated using wire:… commands or does it have to be done manually with JS?
Are you using the latest version of Livewire:
yes
Do you have any screenshots or code examples:
<div class="row">
<div class="col-lg-6">
<button type="button" wire:click.prevent="store()" wire:loading.attr="disabled" class="btn mydir-button mr-2">Save @if($action == 'add') and Exit @endif</button>
<button type="button" wire:click.prevent="storeAndMakeLive()" wire:loading.attr="disabled" class="btn mydir-button">Save And Make Live</button>
</div>
<div wire:loading wire:target="store, storeAndMakeLive">Processing... Please wait</div>
</div>