Closed savosik closed 2 months ago
This is the native behaviour of HTML forms, if they are posted, then everything flies into the request and, accordingly, if there are values there, then they will affect the counter, if you want to change the native behaviour of forms, then add your own JS or suggest PR.
MoonShine Version
2.20.7
Laravel Version
10.4.1
PHP Version
8.2
Database Driver & Version
No response
Description
When using
DateRange
andRangeSlider
fields in filters, even when no values are selected, these fields are being submitted with the form. This causes two issues:Expected Behavior
DateRange
andRangeSlider
fields.Actual Behavior
DateRange
andRangeSlider
fields even when they are empty.Additional Context
This behavior can lead to confusion for users, as it appears that filters are applied when they actually aren't. It also affects the accuracy of the filter count display.
Possible Solution
Modify the form submission process for
DateRange
andRangeSlider
fields to only include them in the GET request and filter count if they have actual values set.Steps To Reproduce
DateRange
and/orRangeSlider
fields.