livewire-powergrid icon indicating copy to clipboard operation
livewire-powergrid copied to clipboard

Interdependent Filters - not reseting dependent filter

Open dmitic opened this issue 4 months ago • 0 comments

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

PowerGrid

5.10.6

Laravel

11.25.0

Livewire

3.5.8

Alpine JS

3.14.1

Theme

Tailwind 3.x

Describe the bug.

When interdependent filters are used and an option from the main filter is selected, the option from the dependent filter works, but when the value "All" is selected on the main filter, the dependent filter is not reset and it still filters by the last filtered option instead of resetting that filter too.

To Reproduce...

  1. On demo page https://demo.livewire-powergrid.com/examples/filter-depends from "State" filter choose any value.
  2. From "City" filter choose any value.
  3. Select value "All" in "State" filter: instead of resetting all the values everything will be still filtered by "City" filter but with wrong value selected.

image

Extra information

<?php
 //...

dmitic avatar Oct 01 '24 08:10 dmitic