Skip to content

Commit

Permalink
fix: assigned to variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kanikabansal-juspay committed Oct 14, 2024
1 parent 719796e commit dd52f38
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/SelectBox.res
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ module RenderListItemInBaseRadio = {
~optionClass="",
~selectClass="",
~customScrollStyle=?,
~shouldDisplaySelectedOnTop
~shouldDisplaySelectedOnTop,
) => {
let decodedValue = value->JSON.Decode.string
switch (decodedValue, shouldDisplaySelectedOnTop) {
Expand Down Expand Up @@ -1292,7 +1292,7 @@ module BaseRadio = {
~selectClass="",
~customScrollStyle=?,
~dropdownContainerStyle="",
~shouldDisplaySelectedOnTop=false
~shouldDisplaySelectedOnTop=false,
) => {
let options = React.useMemo(() => {
options->Array.map(makeNonOptional)
Expand Down Expand Up @@ -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 =
<div
className={`${customSearchStyle} border-b border-jp-gray-lightmode_steelgray border-opacity-75 dark:border-jp-gray-960 `}>
Expand Down Expand Up @@ -1446,10 +1449,7 @@ module BaseRadio = {
</RenderIf>
}}
<div
className={`${switch customScrollStyle {
| Some(_) => "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 {
<div className="flex justify-center items-center m-4">
{React.string("No matching records found")}
Expand Down Expand Up @@ -1608,7 +1608,7 @@ module BaseDropdown = {
~customDropdownOuterClass="",
~customScrollStyle=?,
~dropdownContainerStyle="",
~shouldDisplaySelectedOnTop=false
~shouldDisplaySelectedOnTop=false,
) => {
let transformedOptions = useTransformed(options)
let isMobileView = MatchMedia.useMobileChecker()
Expand Down

0 comments on commit dd52f38

Please sign in to comment.