From 29a28cb99e2cba1f5c46f0dd58ffb9e842a4be9a Mon Sep 17 00:00:00 2001 From: mimshins Date: Sun, 26 May 2024 13:55:38 +0330 Subject: [PATCH] Fix get options utility --- lib/Select/utils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Select/utils.ts b/lib/Select/utils.ts index 1342950..05761c4 100644 --- a/lib/Select/utils.ts +++ b/lib/Select/utils.ts @@ -26,12 +26,13 @@ export const noValueSelected = (value: string | string[] | undefined) => export const getOptions = ( childArray: Array>, + isInList = false, ) => { - let isListFound = false; + let isListFound = isInList; const recurse = ( childArray: Array>, - isInList = false, + isInList: boolean, ): Array< PickAsMandatory > => { @@ -92,7 +93,7 @@ export const getOptions = ( ); }; - return recurse(childArray); + return recurse(childArray, isInList); }; type Registry = Map;