From dd52f38655ccbfd3e577d7bfb5e9a948dae7340d Mon Sep 17 00:00:00 2001 From: Kanika Bansal Date: Mon, 14 Oct 2024 11:55:23 +0530 Subject: [PATCH] fix: assigned to variable --- src/components/SelectBox.res | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/SelectBox.res b/src/components/SelectBox.res index 5a2dbc604..feb95f59e 100644 --- a/src/components/SelectBox.res +++ b/src/components/SelectBox.res @@ -1104,7 +1104,7 @@ module RenderListItemInBaseRadio = { ~optionClass="", ~selectClass="", ~customScrollStyle=?, - ~shouldDisplaySelectedOnTop + ~shouldDisplaySelectedOnTop, ) => { let decodedValue = value->JSON.Decode.string switch (decodedValue, shouldDisplaySelectedOnTop) { @@ -1292,7 +1292,7 @@ module BaseRadio = { ~selectClass="", ~customScrollStyle=?, ~dropdownContainerStyle="", - ~shouldDisplaySelectedOnTop=false + ~shouldDisplaySelectedOnTop=false, ) => { let options = React.useMemo(() => { options->Array.map(makeNonOptional) @@ -1418,7 +1418,10 @@ module BaseRadio = { } }, (searchString, options, selectedString)) let overflowClass = !isDropDown ? "" : "overflow-auto" - + let heightScroll = switch customScrollStyle { + | Some(_) => "max-h-full" + | None => maxHeight + } let searchInputUI =
@@ -1446,10 +1449,7 @@ module BaseRadio = { }}
"max-h-full" - | None => maxHeight - }} ${listPadding} ${overflowClass} text-fs-13 font-semibold text-jp-gray-900 text-opacity-75 dark:text-jp-gray-text_darktheme dark:text-opacity-75 ${inlineClass} ${baseComponentCustomStyle}`}> + className={`${heightScroll} ${listPadding} ${overflowClass} text-fs-13 font-semibold text-jp-gray-900 text-opacity-75 dark:text-jp-gray-text_darktheme dark:text-opacity-75 ${inlineClass} ${baseComponentCustomStyle}`}> {if newOptions->Array.length === 0 && showMatchingRecordsText {
{React.string("No matching records found")} @@ -1608,7 +1608,7 @@ module BaseDropdown = { ~customDropdownOuterClass="", ~customScrollStyle=?, ~dropdownContainerStyle="", - ~shouldDisplaySelectedOnTop=false + ~shouldDisplaySelectedOnTop=false, ) => { let transformedOptions = useTransformed(options) let isMobileView = MatchMedia.useMobileChecker()