What seems to be the problem:
Using Alpine inside Livewire component, i’m able to add an active class, but it does not remove the active class once i click on another button,
The method on the wire:click call is this:
public function selectedCity($cityName): void
{
$this->selected = $this->getCityName($cityName);
$this->emit('locationChanged');
}
it emit a broadcast so another component responsible for changing the location to the current clicked button.
In the screenshot you can see the active state still active on both clicked button.
is there a workaround this please ?
Are you using the latest version of Livewire: yes
Do you have any screenshots or code examples: yes