-
Notifications
You must be signed in to change notification settings - Fork 335
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
Allow to remove undefined filter #5140
Allow to remove undefined filter #5140
Conversation
Found a new strange bug while testing this. When adding a text filter, confirming some value, deleting the value and confirming again, the displayed Something similar happens when assigning some values to the types dropdown of the media list, confirming, unselecting all options and confirming again. |
Also found another bug with the types dropdown of the media list. When adding a types filter, selecting all options, confirming, changing the selected options and confirming again, the list contains a lot of duplicated entires. It looks like the old list items are not resetted.. 🙈 |
Can confirm the first bug you've described, but it was already like that before this PR, therefore I am going to fix that separately. The second bug you have described I can't reproduce... Tried the following steps:
|
And changed my mind about the first issue, it's so less code, that I am going to include it in this PR 🙈 |
Sorry, that wasnt a very good explanation of the second bug. Here is another try:
|
@@ -21,10 +21,6 @@ class TextFieldFilterType extends AbstractFieldFilterType<?{eq: string}> { | |||
} | |||
|
|||
getValueNode(value: ?{eq: string}) { | |||
if (!value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you remember why you implemented this previously? I suspect there is a similar problem in the DropdownFieldFilterType
and maybe in the DateTimeFieldFilterType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is just a leftover from before I was using a Promise here... I'll check the other types as well.
Fixed all the other FieldTypes as well. And I still can't reproduce your second issue. I don't get multiple media by following your instructions, no matter if I confirm between unselecting and reselecting Video or doing it in one step. |
About the second issue. I cant rule out that this is a local problem, but i really doubt it: https://imgur.com/xXnbBCz |
@danrot @nnatter looking at the screenshots I'm asking myself if the multi-select really makes sense at this point? Maybe only Single-Selection as "DropDown", and the Multi-Selection is always "open"? |
@nnatter I think the About the second issue, all I can tell, is that this is definitely not happening to me: @chirimoya A single selection does still not make a lot of sense to me... Can you think any use case, in which you want the user to completely forbid to filter for two options? That doesn't make any sense to me, stuff like types, status and so on should be easily filterable by two options as well IMO. Using something else for the |
@danrot list of checkboxes +1 |
@chirimoya The only thing that might be a little bit cumbersome is the positioning of the OK button... But let's discuss that somewhere else, this PR is actually about something else 🙂 |
Looks like there are 3 open topics now, so i will group my answers by topic:
I would expect the popover of the filter-chip to grow till it reaches a certain maximum height. After that point, U think it would be okay to just make the whole popover scrollable. Only making the options scrollable and always displaying the |
What's in this PR?
This PR also saves the user settings, when only undefined values are removed. But the list should still not reload.
Why?
Because otherwise the list will set the stored user setting as default again, when the last item is
undefined
and removed.