@@ -8,8 +8,8 @@ import { GroupBase, MenuListProps, Props, SelectInstance, createFilter } from "r
88import { isJson } from "../../utils/utils" ;
99import { ParseKeys } from "i18next" ;
1010import { FixedSizeList , ListChildComponentProps } from "react-window" ;
11- import AsyncSelect from ' react-select/async' ;
12- import AsyncCreatableSelect from ' react-select/async-creatable' ;
11+ import AsyncSelect from " react-select/async" ;
12+ import AsyncCreatableSelect from " react-select/async-creatable" ;
1313
1414export type DropDownOption = {
1515 label : string ,
@@ -57,7 +57,7 @@ const DropDown = <T, >({
5757 disabled ?: boolean ,
5858 menuIsOpen ?: boolean ,
5959 handleMenuIsOpen ?: ( open : boolean ) => void ,
60- menuPlacement ?: ' auto' | ' top' | ' bottom' ,
60+ menuPlacement ?: " auto" | " top" | " bottom" ,
6161 skipTranslate ?: boolean ,
6262 optionHeight ?: number ,
6363 customCSS ?: {
@@ -85,7 +85,7 @@ const DropDown = <T, >({
8585 if ( handleMenuIsOpen !== undefined ) {
8686 handleMenuIsOpen ( open ) ;
8787 }
88- }
88+ } ;
8989
9090 const formatOptions = (
9191 unformattedOptions : DropDownOption [ ] ,
@@ -94,7 +94,7 @@ const DropDown = <T, >({
9494 // Translate
9595 // Translating is expensive, skip it if it is not required
9696 if ( ! skipTranslate ) {
97- unformattedOptions = unformattedOptions . map ( option => ( { ...option , label : t ( option . label as ParseKeys ) } ) )
97+ unformattedOptions = unformattedOptions . map ( option => ( { ...option , label : t ( option . label as ParseKeys ) } ) ) ;
9898 }
9999
100100 // Add "No value" option
@@ -119,7 +119,7 @@ const DropDown = <T, >({
119119 unformattedOptions . sort ( ( a , b ) => JSON . parse ( a . label ) . order - JSON . parse ( b . label ) . order ) ;
120120 } else {
121121 // Apply alphabetical ordering.
122- unformattedOptions . sort ( ( a , b ) => a . label . localeCompare ( b . label ) )
122+ unformattedOptions . sort ( ( a , b ) => a . label . localeCompare ( b . label ) ) ;
123123 }
124124
125125 return unformattedOptions ;
@@ -130,9 +130,9 @@ const DropDown = <T, >({
130130 * Custom component for list virtualization
131131 */
132132 const MenuList = ( props : MenuListProps < DropDownOption , false > ) => {
133- const { options, children, maxHeight, getValue } = props
133+ const { options, children, maxHeight, getValue } = props ;
134134
135- console . log ( "Menu List render" )
135+ console . log ( "Menu List render" ) ;
136136
137137 return Array . isArray ( children ) ? (
138138 < div style = { { paddingTop : 4 } } >
@@ -146,8 +146,8 @@ const DropDown = <T, >({
146146 { ( { index, style } : ListChildComponentProps ) => < div style = { { ...style } } > { children [ index ] } </ div > }
147147 </ FixedSizeList >
148148 </ div >
149- ) : null
150- }
149+ ) : null ;
150+ } ;
151151
152152 const loadOptions = (
153153 inputValue : string ,
@@ -179,7 +179,7 @@ const DropDown = <T, >({
179179 onMenuClose : ( ) => openMenu ( false ) ,
180180 isDisabled : disabled ,
181181 openMenuOnFocus : openMenuOnFocus ,
182- menuPlacement : menuPlacement ?? ' auto' ,
182+ menuPlacement : menuPlacement ?? " auto" ,
183183
184184 //@ts -expect-error: React-Select typing does not account for the typing of option it itself requires
185185 components : { MenuList } ,
0 commit comments