Power-Components / livewire-powergrid

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

Clearing out filters causing 500 error #1388

Closed caiochami closed 5 months ago

caiochami commented 5 months 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

8.2.15

PowerGrid

5.3.6

Laravel

10.43.0

Livewire

3.4.4

Alpine JS

No response

Theme

Tailwind 3.x

Describe the bug.

After applying a filter to a enumSelect input field, if you click the filter badge to clear it out, a 500 error is thrown.

image

image

image

image

To Reproduce...

You need to define a filter that looks like this:

Filter::enumSelect('status', 'clients.status') ->dataSource(AvailabilityStatus::cases()) ->optionLabel('clients.status')

The issue here is the 'clients.status' param in the enumSelect() method. It works if you remove the dots from it.

Success: Filter::enumSelect('status', 'status') ->dataSource(AvailabilityStatus::cases()) ->optionLabel('clients.status')

Extra information

No response

luanfreitasdev commented 5 months ago

Hello @caiochami

Should the current release be related to this issue?

Thanks

caiochami commented 5 months ago

Yes. It's been resolved. Thank you