How to disable 2 buttons when clicking on one of them

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>

Register a public property
public $showButton = true;

in the method when clicked:

public function store(){
$this->showButton = false;
}

in the component:

<button
type=“button” wire:click.prevent=“store()”
wire:loading.attr=“disabled”
@if (showButton)
disabled
@endif
class=“btn mydir-button mr-2”>Save @if($action == ‘add’) and Exit @endif

or enjoy your div In your case, it will hide the buttons completely

@if (showButton)
      <button></button>
      <button></button>  
@endif