Possible Bug in Action ->disabled() and ->hidden()

I have added Filament action to a custom livewire page. The disabled function works a little odd, the condition changes to true/false but the ->action() would not execute.

If i remove the disabled(), it works as expected.

Can any one reproduce this?

public function nextPageAction(): Action
{
    return Action::make('nextPage')
        ->button()
        ->disabled(fn () => $this->totalPages <= 1 || $this->page === $this->totalPages)
        // ->hidden($this->totalPages <= 1 || $this->page === $this->totalPages)
        ->action(function () {
            dd($this->page);
            $this->nextPage();
        });
}
Solution
My bad, the totalPages must be a public property. I had protected ?int $totalPages = null; and changing it to public ?int $totalPages = null; worked.
Was this page helpful?