Replies: 1 comment
-
Hi @MiroJelev, Thank you for reaching out. Honestly, I haven't considered this use case yet. Interdependent fields are not sound like they are going to introduce a lot of trouble, on a database level or using select2. Would you mind sharing the exact use case? Every so often, the best solution isn't to add a patch, but to rethink the implementation. In a "the best part is no part" kinda way. If you want to drop the clearing behavior, please you can provide your custom JS copy, while dropping the Cheers! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goal
I want to make filters for a table that inter depend on each other so that it doesn't matter which filter I choose to start with first.
Problem
The problem comes when I set the filters to depend on each other in the
dependent_fields
like so:https://django-select2.readthedocs.io/en/latest/extra.html#interdependent-select2
When I select the first field, everything is okay, but when I click a new value for the second field, it resets (clears) the first field. The same happens when I try the other way around.
Am I missing something?
Cheers!
Code Snippet
Beta Was this translation helpful? Give feedback.
All reactions