@@ -18,8 +18,8 @@ import {
1818 GroupHeadingProps ,
1919 MultiValueProps ,
2020 OptionProps ,
21- ValueContainerProps ,
2221 Props as ReactSelectProps ,
22+ ValueContainerProps ,
2323} from 'react-select'
2424import CreatableSelect from 'react-select/creatable'
2525import { ReactElement , useCallback , useMemo , useRef , useState } from 'react'
@@ -28,23 +28,24 @@ import { ConditionalWrap } from '@Common/Helper'
2828import Tippy from '@tippyjs/react'
2929import { deriveBorderRadiusAndBorderClassFromConfig , isNullOrUndefined } from '@Shared/Helpers'
3030import { getCommonSelectStyle , getSelectPickerOptionByValue } from './utils'
31+
32+ import { SelectPickerOptionType , SelectPickerProps , SelectPickerVariantType } from './type'
33+ import FormFieldWrapper from '../FormFieldWrapper/FormFieldWrapper'
34+ import { getFormFieldAriaAttributes } from '../FormFieldWrapper'
3135import {
32- SelectPickerMultiValueLabel ,
33- SelectPickerMultiValueRemove ,
36+ renderLoadingMessage ,
3437 SelectPickerClearIndicator ,
3538 SelectPickerControl ,
3639 SelectPickerDropdownIndicator ,
3740 SelectPickerGroupHeading ,
41+ SelectPickerInput ,
3842 SelectPickerMenuList ,
43+ SelectPickerMultiValueLabel ,
44+ SelectPickerMultiValueRemove ,
3945 SelectPickerOption ,
4046 SelectPickerValueContainer ,
41- SelectPickerInput ,
4247} from './common'
43- import { SelectPickerOptionType , SelectPickerProps , SelectPickerVariantType } from './type'
4448import { GenericSectionErrorState } from '../GenericSectionErrorState'
45- import FormFieldWrapper from '../FormFieldWrapper/FormFieldWrapper'
46- import { getFormFieldAriaAttributes } from '../FormFieldWrapper'
47- import './selectPicker.scss'
4849
4950/**
5051 * Generic component for select picker
@@ -180,6 +181,7 @@ import './selectPicker.scss'
180181 * />
181182 * ```
182183 */
184+
183185const SelectPicker = < OptionValue , IsMulti extends boolean > ( {
184186 error,
185187 icon,
@@ -268,6 +270,7 @@ const SelectPicker = <OptionValue, IsMulti extends boolean>({
268270 )
269271
270272 // Used to show the create new option for creatable select and the option(s) doesn't have the input value
273+
271274 const isValidNewOption = ( _inputValue : string ) => {
272275 const trimmedInput = _inputValue ?. trim ( )
273276
@@ -459,6 +462,7 @@ const SelectPicker = <OptionValue, IsMulti extends boolean>({
459462 MultiValueRemove : SelectPickerMultiValueRemove ,
460463 GroupHeading : renderGroupHeading ,
461464 NoOptionsMessage : renderNoOptionsMessage ,
465+ LoadingMessage : renderLoadingMessage ,
462466 Input : SelectPickerInput ,
463467 ...( shouldHideMenu && {
464468 Menu : ( ) => null ,
0 commit comments