F
Filament15mo ago
Antoine

Doesn't change on livewire property in getHeaderWidget()

Hello everybody, I have a Livewire property that changes its state based on user interaction on a button in a ListRecords page.
public bool $activeWidget = true;

protected function getHeaderWidgets(): array
{
return $this->activeWidget === true ? $this->getWidgets(): [];
}
public bool $activeWidget = true;

protected function getHeaderWidgets(): array
{
return $this->activeWidget === true ? $this->getWidgets(): [];
}
When the state of $activeWidget changes thanks to user interaction, the widgets disappear but conversely when they need to be displayed nothing happens. When I refresh the page, the widgets display fine. I think there is a problem with updating. If I refresh my component with a method like this $this->dispatch('refresh') only the values ​​of my table are refreshed and not my widgets. Has someone already had this problem?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server