From 6a7aa244b7adfcc22572b1dc0d72eb5b74be37ec Mon Sep 17 00:00:00 2001 From: Chisomchima Date: Tue, 22 Oct 2024 09:27:44 +0100 Subject: [PATCH] chore: update field filters in edit page --- src/pages/categoryOptionGroups/Edit.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pages/categoryOptionGroups/Edit.tsx b/src/pages/categoryOptionGroups/Edit.tsx index f1b8e7ad..529cb7c7 100644 --- a/src/pages/categoryOptionGroups/Edit.tsx +++ b/src/pages/categoryOptionGroups/Edit.tsx @@ -2,7 +2,12 @@ import React from 'react' import { useQuery } from 'react-query' import { useParams } from 'react-router-dom' import { DefaultEditFormContents, FormBase } from '../../components' -import { DEFAULT_FIELD_FILTERS, SECTIONS_MAP, useOnSubmitEdit } from '../../lib' +import { + ATTRIBUTE_VALUES_FIELD_FILTERS, + DEFAULT_FIELD_FILTERS, + SECTIONS_MAP, + useOnSubmitEdit, +} from '../../lib' import { useBoundResourceQueryFn } from '../../lib/query/useBoundQueryFn' import { PickWithFieldFilters } from '../../types/generated' import { CategoryOptionGroup } from '../../types/models' @@ -11,6 +16,7 @@ import { validate } from './form/categoryOptionGroupSchema' const fieldFilters = [ ...DEFAULT_FIELD_FILTERS, + ...ATTRIBUTE_VALUES_FIELD_FILTERS, 'name', 'shortName', 'code', @@ -18,7 +24,6 @@ const fieldFilters = [ 'categoryOptions[id,displayName]', 'dataDimension', 'dataDimensionType', - 'attributeValues[value,attribute[id]]', ] as const export type CategoryOptionGroupFormValues = PickWithFieldFilters<