Skip to content

Commit 9b888ef

Browse files
authored
Merge pull request #323 from opencrvs/add-initial-value-type
chore(v1.6.1): Add initial value type to match types in core
2 parents a6819e0 + 72ec42c commit 9b888ef

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ INSERT CSV ROWS IN ENGLISH ONLY
136136
- Github pipeline dedicated for reading secrets and variables from other environments now checks if GH_TOKEN is still valid before attempting other operations
137137
- 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)
138138
- 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)
139+
- Fixed missing InitialValue property to set initial values based on an expression
139140

140141
## 1.5.2 (https://github.com/opencrvs/opencrvs-countryconfig/compare/v1.5.1...v1.5.2)
141142

src/form/types/types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ export interface IFormFieldBase {
562562
disabled?: boolean
563563
enabled?: string
564564
custom?: boolean
565-
initialValue?: IFormFieldValue
565+
initialValue?: InitialValue
566566
initialValueKey?: string
567567
extraValue?: IFormFieldValue
568568
conditionals?: Conditional[]
@@ -838,6 +838,13 @@ export interface IDateRangePickerValue {
838838
isDateRangeActive: boolean | undefined
839839
}
840840

841+
export type DependencyInfo = {
842+
expression: string
843+
dependsOn: string[]
844+
}
845+
846+
export type InitialValue = IFormFieldValue | DependencyInfo
847+
841848
export type IFormFieldValue =
842849
| string
843850
| string[]

0 commit comments

Comments
 (0)