Skip to content
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

[dataquery/dictionary] Add option to display enums as either value or field in dataquery module #9224

Merged
merged 8 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion modules/dataquery/jsx/definefilters.addfiltermodal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,11 @@ function valueInput(fielddict: FieldDictionary,
i++
) {
const opt = fielddict.options[i];
opts[opt] = opt;
if (fielddict.labels) {
opts[opt] = fielddict.labels[i];
} else {
opts[opt] = opt;
}
}
if (op == 'in') {
return <SelectElement
Expand Down
4 changes: 2 additions & 2 deletions modules/dataquery/jsx/hooks/usebreadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function useBreadcrumbs(
useEffect(() => {
const breadcrumbs = [
{
text: 'Data Query Tool (Alpha)',
text: 'Data Query Tool (Beta)',
/**
* OnClick handler for the main breadcrumb
*
Expand Down Expand Up @@ -77,7 +77,7 @@ function useBreadcrumbs(
*/
onClick: (e) => {
e.preventDefault();
setActiveTab('View Data');
setActiveTab('ViewData');
},
});
}
Expand Down
1 change: 1 addition & 0 deletions modules/dataquery/jsx/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export type FieldDictionary = {
cardinality: 'unique' | 'single' | 'optional' | 'many',
visits?: string[], // session only
options?: string[], // enum only
labels?: string[], // enum only, and only if provided
}

export interface DictionaryCategory {
Expand Down
Loading
Loading