-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reset filtered SELECT when filter SELECT selection changed #394
Comments
Hello @printpagestopdf I believe the behaviour you seek is what currently is.
Is this not what you described as the preferred behaviour of resetting the filter? Also, please update to the latest version of the library. 2.6.4 is several versions behind. |
At first: excuse, my fault with the old Version, but I am working on an installation that somebody else made (and controls). But for this case the behaviour of https://bladewindui.com/component/select#another-select, has still the same "problem". Lets make an example there: Perhaps there are use cases that want this behaviour, but it would be great, if there would be a mode that select 2 is always reset (selection and hidden input) when selection 1 changed. Sorry for my bad english, hopefully the description is understandable.
At first: excuse, my fault with the old Version, but I am working on an installation that somebody else made (and controls). But for this case the behaviour of https://bladewindui.com/component/select#another-select, has still the same "problem". Lets make an example there: Perhaps there are use cases that want this behaviour, but it would be great, if there would be a mode that select 2 is always reset (selection and hidden input) when selection 1 changed. Sorry for my bad english, hopefully the description is understandable. |
Oh. I understand you perfectly now. You have a valid point. I'll add an attribute that allows you to clear the child if the parent value changes. |
If filter and filter_by with two selects are used, the filtered select list stays on last selection if the filter select changes. I believe in most circumstances this is not the expected behaviour. It can lead to situations, where the filtered list has a value that is not allowed for the filter selection.
In my opinion the default behaviour should be, that the filtered list is reset always when the selection of the filter changes. If there is a need for the current behaviour, it could be enabled by an option?
In the moment I am using the following workaround:
public/vendor/bladewind/js/select.js:
P.S.: For everybody who dislikes eval (from good reasons): in my real implementation I added a global Map for all selects (in select.blade.php) and use it without eval
BladewindVersion by composer.lock says: v2.6.4
The text was updated successfully, but these errors were encountered: