From 495ca157e430906b8b5566c471fc688728f29415 Mon Sep 17 00:00:00 2001 From: Jan-Gerke Salomon Date: Tue, 6 Feb 2024 12:31:31 +0800 Subject: [PATCH] fix(aggregation type field): allow "undefined" as value type in the validator --- src/pages/dataElements/fields/AggregationTypeField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/dataElements/fields/AggregationTypeField.tsx b/src/pages/dataElements/fields/AggregationTypeField.tsx index 6ac934ba..e2963b71 100644 --- a/src/pages/dataElements/fields/AggregationTypeField.tsx +++ b/src/pages/dataElements/fields/AggregationTypeField.tsx @@ -74,7 +74,7 @@ export function AggregationTypeField() { validateFields={[]} // @TODO: Why can I not use `FormValues` here? // eslint-disable-next-line @typescript-eslint/no-explicit-any - validate={(value: string, values: any) => { + validate={(value: string | undefined, values: any) => { const { valueType } = values // Using the `disabled` value from above causes an issue: // Warning: Cannot update a component (`ForwardRef(Field)`)