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
Filters: Why does Input value sometimes default to true on string types? #11919
Comments
Agree that this is a point for UX improvement 👍 Notes on what's happening hereWhen we switch to null/nnull/empty/nempty, the value is set to directus/app/src/interfaces/_system/system-filter/nodes.vue Lines 264 to 269 in 962af79
But since contains/ncontains etc doesn't have a switch case, it defaulted to using the original directus/app/src/interfaces/_system/system-filter/nodes.vue Lines 280 to 282 in 962af79
|
Cool. Thanks! |
@erondpowell We'll leave this open as an improvement. We should clear the value when you switch operators to/from a type that's incompatible with that value 👍🏻 |
Got ya, jumped straight from email and didn't read Azzy's first line 👍 |
Preflight Checklist
Describe the Bug
When filtering radio buttons, if you set the operator to no-value-required operator like null, is not null, empty, is not empty, etc. then switch back to an operator that takes a value, it automatically sets the input value to
true
, however radio buttons appear to be stored as String type, not Boolean. This happens on the other string type Fields I have tested so far.This seemed like a weird behavior so I'm adding it into bugs... but there are no console errors, so maybe it is just a silly question! 😄
Why start with
--
as default Filter Value then switch totrue
even in cases where it seems liketrue
can't even be filtered for?To Reproduce
Screen.Recording.2022-03-02.at.2.20.21.PM.mov
Errors Shown
no.
What version of Directus are you using?
9.5
What version of Node.js are you using?
cloud
What database are you using?
cloud
What browser are you using?
safari
What operating system are you using?
Mac
How are you deploying Directus?
cloud
The text was updated successfully, but these errors were encountered: