-
Notifications
You must be signed in to change notification settings - Fork 2
Multi value text choices #1923
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: develop
Are you sure you want to change the base?
Multi value text choices #1923
Conversation
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
packages/components/src/internal/components/domainproperties/actions.ts
Outdated
Show resolved
Hide resolved
packages/components/src/internal/components/domainproperties/actions.ts
Outdated
Show resolved
Hide resolved
packages/components/src/internal/components/domainproperties/DomainRow.tsx
Outdated
Show resolved
Hide resolved
| if ( | ||
| (type === 'TextChoice' || type === 'MultiChoice') && | ||
| !rawPropertyValidator[i]?.properties?.validValues | ||
| ) { |
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 would define a variable isChoice below the hasExpressionStr variable above:
const isChoice = type === 'TextChoice' || type === 'MultiChoice';Then the if statement will fit on one line instead of 4, and be a little easier to read.
| if ( | |
| (type === 'TextChoice' || type === 'MultiChoice') && | |
| !rawPropertyValidator[i]?.properties?.validValues | |
| ) { | |
| if (isChoice && !rawPropertyValidator[i]?.properties?.validValues) { |
packages/components/src/internal/components/editable/actions.ts
Outdated
Show resolved
Hide resolved
packages/components/src/internal/components/search/QueryFilterPanel.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/internal/components/search/QueryFilterPanel.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/internal/components/search/FilterFacetedSelector.tsx
Outdated
Show resolved
Hide resolved
labkey-alan
left a comment
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.
Left some minor feedback but otherwise looks good.
| api?: ComponentsAPIWrapper; | ||
| canBeBlank: boolean; | ||
| disabled?: boolean; | ||
| field?: QueryColumn; |
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.
field is always passed, so it should be defined as: field: QueryColumn. If it could be undefined then the type should be field: QueryColumn | undefined.
| field?: QueryColumn; | |
| field: QueryColumn; |
| fieldFilters: Filter.IFilter[]; | ||
| fieldKey: string; | ||
| onFieldFilterUpdate?: (newFilters: Filter.IFilter[], index) => void; | ||
| onFieldFilterUpdate?: (newFilter: Filter.IFilter[]) => void; |
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.
onFieldFilterUpdate is always passed so it should be defined as:
| onFieldFilterUpdate?: (newFilter: Filter.IFilter[]) => void; | |
| onFieldFilterUpdate: (newFilter: Filter.IFilter[]) => void; |
Rationale
This PR enables "Multi Choice" data type in domain designer and supports editing/sorting multi values in the app.
Related Pull Requests
Changes
SelectInputto skipJoinValues to align with its actual usageFilterFacetedSelectorandQueryFilterPanelto handle array value selecting for MVTC