From 6375dc05e31e5c497e7c9a58848e404f049900f1 Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Mon, 2 Sep 2024 15:08:04 +0600 Subject: [PATCH 1/2] feat: optionCondition to filter document select options --- src/form/types/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/form/types/types.ts b/src/form/types/types.ts index 70e12b025..2d56d1255 100644 --- a/src/form/types/types.ts +++ b/src/form/types/types.ts @@ -409,6 +409,7 @@ export interface IImageUploaderWithOptionsFormField extends IFormFieldBase { export interface IDocumentUploaderWithOptionsFormField extends IFormFieldBase { type: typeof DOCUMENT_UPLOADER_WITH_OPTION options: ISelectOption[] + optionCondition?: string hideOnEmptyOption?: boolean compressImagesToSizeMB?: number maxSizeMB?: number From ca8881a94b0a08aea87ab633c73b7ce613c0cc12 Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Mon, 2 Sep 2024 15:24:03 +0600 Subject: [PATCH 2/2] docs: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 752196068..bd203bd65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,7 @@ INSERT CSV ROWS IN ENGLISH ONLY - Logged in user details handlebar `loggedInUser` [#6529](https://github.com/opencrvs/opencrvs-core/issues/6529) - Supporting document fields can now be made required - If there is only one option in the document uploader select, then it stays hidden and only the upload button is showed with the only option being selected by default +- The select options in DOCUMENT_UPLOADER_WITH_OPTION field can now be hidden using the new `optionCondition` property. It works similarly to the same property available in SELECT_WITH_OPTIONS field * **ElasticSearch reindexing**