@@ -22,7 +22,8 @@ import {
2222 type UseMultipleSelectionState ,
2323} from 'downshift' ;
2424
25- import { fnUtils , getDataTestId , isClient } from '@alfalab/core-components-shared' ;
25+ import { useCoreConfig } from '@alfalab/core-components-config' ;
26+ import { fnUtils , getDataTestId } from '@alfalab/core-components-shared' ;
2627import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks' ;
2728
2829import { SIZE_TO_CLASSNAME_MAP } from '../../consts' ;
@@ -123,7 +124,7 @@ export const BaseSelect = forwardRef<unknown, ComponentProps>(
123124 ModalMobile,
124125 BottomSheet,
125126 limitDynamicOptionGroupSize,
126- environment = isClient ( ) ? window : undefined ,
127+ environment : environmentFromProps ,
127128 } = props ;
128129 const shouldSearchBlurRef = useRef ( true ) ;
129130 const rootRef = useRef < HTMLDivElement > ( null ) ;
@@ -133,7 +134,8 @@ export const BaseSelect = forwardRef<unknown, ComponentProps>(
133134 const searchRef = useRef < HTMLInputElement > ( null ) ;
134135 const scrollableContainerRef = useRef < HTMLDivElement > ( null ) ;
135136 const onOpenRef = useRef ( onOpen ) ;
136-
137+ const { environment : environmentFromConfig } = useCoreConfig ( ) ;
138+ const environment = environmentFromProps ?? environmentFromConfig ;
137139 const [ searchState , setSearchState ] = React . useState ( '' ) ;
138140
139141 const [ search , setSearch ] =
0 commit comments