-
Notifications
You must be signed in to change notification settings - Fork 91
ENG-3832: Render multi-select dropdown for taxonomy[] custom fields #8197
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
base: main
Are you sure you want to change the base?
Changes from all commits
7c492b4
fa7ce0f
62d829f
300333f
d80fd79
c8ca49b
141d002
19b4c1a
ee88f35
b0c4a15
7ff0c69
3940ab0
25c50b2
af89afa
7e6bdfc
3305b7f
bd3042e
df53512
c74b8c1
4b26162
f4b7891
4b6f69b
6a1d902
631fd2b
4dade3c
729fbbb
a2113c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| type: Added | ||
| description: Support multi-select taxonomy custom fields via the "taxonomy_key[]" field_type convention — frontend now renders a multi-select dropdown for [] fields on taxonomy detail pages | ||
| pr: 8197 | ||
| labels: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,6 +59,11 @@ const TaxonomyCustomFieldsForm = ({ | |
| } = customFieldDefinition; | ||
|
|
||
| if (!allowListId) { | ||
| const isMultiSelectTaxonomy = fieldType.endsWith("[]"); | ||
| const taxonomyKey = isMultiSelectTaxonomy | ||
| ? fieldType.slice(0, -2) | ||
| : fieldType; | ||
|
|
||
| return ( | ||
| <Form.Item | ||
| key={definitionId} | ||
|
|
@@ -70,7 +75,8 @@ const TaxonomyCustomFieldsForm = ({ | |
| <Input /> | ||
| ) : ( | ||
| <CustomTaxonomySelect | ||
| taxonomyKey={fieldType} | ||
| taxonomyKey={taxonomyKey} | ||
| mode={isMultiSelectTaxonomy ? "multiple" : undefined} | ||
| defaultValue={customFields.customFieldValues[id]} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| /> | ||
| )} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.