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
CSV field based multi select dropdown as a filter on a condition isn't working in the admin app #11309
Comments
Can confirm this on my end. Not too familiar with Joi conditions myself, but the validation error shows the following:
Not sure if that's the culprit or not. May be related to the shared Schema Snapshot for this issueversion: 1
directus: 9.5.1
collections:
- collection: test
meta:
collection: test
icon: null
note: null
display_template: null
hidden: false
singleton: true
translations: null
archive_field: null
archive_app_filter: true
archive_value: null
unarchive_value: null
sort_field: null
accountability: all
color: null
item_duplication_fields: null
sort: null
group: null
collapse: open
schema:
schema: public
name: test
comment: null
fields:
- collection: test
field: id
type: integer
schema:
name: id
table: test
schema: public
data_type: integer
is_nullable: false
generation_expression: null
default_value: nextval('test_id_seq'::regclass)
is_generated: false
max_length: null
comment: null
numeric_precision: 32
numeric_scale: 0
is_unique: true
is_primary_key: true
has_auto_increment: true
foreign_key_schema: null
foreign_key_table: null
foreign_key_column: null
meta:
collection: test
field: id
special: null
interface: input
options: null
display: null
display_options: null
readonly: true
hidden: true
sort: null
width: full
translations: null
note: null
conditions: null
required: false
group: null
- collection: test
field: blocks
type: csv
schema:
name: blocks
table: test
schema: public
data_type: character varying
is_nullable: true
generation_expression: null
default_value: null
is_generated: false
max_length: 255
comment: null
numeric_precision: null
numeric_scale: null
is_unique: false
is_primary_key: false
has_auto_increment: false
foreign_key_schema: null
foreign_key_table: null
foreign_key_column: null
meta:
collection: test
field: blocks
special:
- csv
interface: select-multiple-dropdown
options:
choices:
- text: Description
value: Description
- text: Subtitle
value: Subtitle
- text: Excerpt
value: Excerpt
display: null
display_options: null
readonly: false
hidden: false
sort: null
width: full
translations: null
note: null
conditions: null
required: false
group: null
- collection: test
field: description
type: string
schema:
name: description
table: test
schema: public
data_type: character varying
is_nullable: true
generation_expression: null
default_value: null
is_generated: false
max_length: 255
comment: null
numeric_precision: null
numeric_scale: null
is_unique: false
is_primary_key: false
has_auto_increment: false
foreign_key_schema: null
foreign_key_table: null
foreign_key_column: null
meta:
collection: test
field: description
special: null
interface: input
options: null
display: null
display_options: null
readonly: false
hidden: false
sort: null
width: full
translations: null
note: null
conditions:
- name: Hide when Blocks contains Description
rule:
_and:
- blocks:
_in:
- Description
hidden: true
required: false
group: null
relations: [] |
Is there any progress (or workaround) with this issue? |
This issue contains all the information that exists so far. Currently no known workarounds. |
Linear: ENG-276 |
One possible workaround: since under the hood the csv is stored in the database as a string, I did some testing and it is possible to add a OR filter for each value to include/exclude: |
Preflight Checklist
Describe the Bug
When using a multi-select dropdown based on a CSV field to trigger the visibility of other fields within a collection, the condition is not triggering.
I know JSON doesn't work due to postgres limitations but I CSV is supposed to.
To Reproduce
Extra details and screenshots to reproduce can be found in this discussion.
#11302
Errors Shown
No console or directus log errors are present.
What version of Directus are you using?
9.5.0
What version of Node.js are you using?
As per docker image
What database are you using?
Postgres 12
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying Directus?
Docker via cloudron and locally
The text was updated successfully, but these errors were encountered: