🐛 Bug: Filtering MultiSelect in more than basic way #534
Labels
👋 For : Community or Good First Issue
Targeting community to contribute
🎃 For : Hacktoberfest
Targeting to Hacktoberfest Event
🍰 Scope : Column
Related to column type or its presentation
✨ Type: Enhancement
Some new changes adding on the existing functionality to make better.
🔦 Type: Feature
New functionality is requested.
Milestone
Environment
NocoDB used as docker : true
NocoDB version : 0.11.29
Database used in NC_DB URL : pg
Project was created by clicking : New Project by connecting to external database
Database on which spreadsheet is created : pg
OS on which NocoDB is running : Linux
Node.js version if running as node : v12.22.1
Database version : 13.4
Steps To Reproduce
tags
of type "MultiSelect" to a table, add optionsFoo
,Bar
andQuux
tags
values:Foo
(row ❷)Bar
(row ❸)Quux
(row ❹)Foo
andBar
(row ❺)Foo
andBar
andQuux
(row ❻)Foo
appear (rows ❷, ❺ and ❻).Expected behavior
There should be an easy way to filter rows based on MultiSelect fields. Using the provided filter operators
is equal
oris like
, this does not seem possible, or at least it's not obvious how to do that.Suggested solution
The possible filter operators should change when I select a MultiSelect field:
contains all of
contains any of
does not contain any of
(alternative phrasing:contains none of
)does not contain all of
(included for completeness, maybe not useful/desirable)The existing filter operators
is (not) null
andis (not) equal
should be kept.However, the following operator families should be hidden for MultiSelect fields. They do not make much sense for such fields and distract from the "correct" operators.
is (not) like
- given that LIKE is string-based, how would one specify filter values??
or_
, breaking the usual LIKE syntaxless/greater than (or equal)
- comparing by inherent ordering is impractical as the ordering of MultiSelect options seems to be fixed as "creation order"number of tags
, which would also allow things likenumber of tags
is equal
1
.Example filters:
tags
contains all of
Foo
tags
contains any of
Foo, Bar
tags
contains all of
Foo, Bar
tags
is equal
Foo, Bar
tags
is equal
Bar
tags
is not null
tags
is null
tags
does not contain any of
Quux
The text was updated successfully, but these errors were encountered: