Power-Components / livewire-powergrid

⚡ PowerGrid generates modern, powerful and easy-to-customize data tables using Laravel Livewire.
https://livewire-powergrid.com
MIT License
1.41k stars 206 forks source link

[BUG] `hideToggleable` Action rule is not working #1539

Closed dansysanalyst closed 1 month ago

dansysanalyst commented 1 month ago

Have you searched through other issues to see if your problem is already reported or has been fixed?

Yes, I did not find it.

Did you read the documentation?

Yes, I did not find it.

Have you tried to publish the views?

Yes - I didn't work.

Is there an error in the console?

No

PHP Version

No response

PowerGrid

No response

Laravel

No response

Livewire

No response

Alpine JS

No response

Theme

Tailwind 3.x

Describe the bug.

The Action Rule to hide the Toggleable is not working as expected.

CleanShot 2024-05-10 at 01 20 24@2x a

 public function actionRules($row): array
    {
            Rule::rows()
                ->when(fn ($dish) => $dish->in_stock == false)
                ->hideToggleable(),
        ];
    }

To Reproduce...

First click on "FOO" then....

Extra information

No response

dansysanalyst commented 1 month ago

I am working on a PR. Should send in the next few days.

luanfreitasdev commented 1 month ago

Released: https://github.com/Power-Components/livewire-powergrid/releases/tag/v5.7.0