From a980972e02e240864455445d13324e855b186422 Mon Sep 17 00:00:00 2001 From: Ollie OpenCRVS Date: Tue, 10 Dec 2024 14:58:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=92=20Merge=20changes=20from=20PR=20#3?= =?UTF-8?q?23=20to=20release-v1.6.1=20(#337)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Barry Dwyer --- CHANGELOG.md | 1 + src/form/types/types.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8692dd5b8..2bd9d8501 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,7 @@ INSERT CSV ROWS IN ENGLISH ONLY - Github pipeline dedicated for reading secrets and variables from other environments now checks if GH_TOKEN is still valid before attempting other operations - Remove unnecessary UI dividers that add in various sections of the declaration forms(e.g the Death, Birth and Marriage forms) [#244](https://github.com/opencrvs/opencrvs-countryconfig/pull/244) - Update template transformer for fields `informantType` and `otherInformantType` that fixes the bug of unavailability of these template fields [#5952](https://github.com/opencrvs/opencrvs-countryconfig/pull/5952) +- Fixed missing InitialValue property to set initial values based on an expression ## 1.5.2 (https://github.com/opencrvs/opencrvs-countryconfig/compare/v1.5.1...v1.5.2) diff --git a/src/form/types/types.ts b/src/form/types/types.ts index 338999849..cec75301b 100644 --- a/src/form/types/types.ts +++ b/src/form/types/types.ts @@ -566,7 +566,7 @@ export interface IFormFieldBase { disabled?: boolean enabled?: string custom?: boolean - initialValue?: IFormFieldValue + initialValue?: InitialValue initialValueKey?: string extraValue?: IFormFieldValue conditionals?: Conditional[] @@ -844,6 +844,13 @@ export interface IDateRangePickerValue { isDateRangeActive: boolean | undefined } +export type DependencyInfo = { + expression: string + dependsOn: string[] +} + +export type InitialValue = IFormFieldValue | DependencyInfo + export type IFormFieldValue = | string | string[]