@@ -131,7 +131,10 @@ type SelectPanelVariantProps = {variant?: 'anchored'; onCancel?: () => void} | {
131131
132132export type SelectPanelProps = SelectPanelBaseProps &
133133 Omit < FilteredActionListProps , 'selectionVariant' | 'variant' | 'message' > &
134- Pick < AnchoredOverlayProps , 'open' | 'height' | 'width' | 'align' | 'displayInViewport' > &
134+ Pick <
135+ AnchoredOverlayProps ,
136+ 'open' | 'height' | 'width' | 'align' | 'displayInViewport' | 'cssAnchorPositioningSettings'
137+ > &
135138 AnchoredOverlayWrapperAnchorProps &
136139 ( SelectPanelSingleSelection | SelectPanelMultiSelection ) &
137140 SelectPanelVariantProps
@@ -204,6 +207,7 @@ function Panel({
204207 focusPrependedElements,
205208 virtualized,
206209 displayInViewport,
210+ cssAnchorPositioningSettings,
207211 ...listProps
208212} : SelectPanelProps ) : JSX . Element {
209213 const titleId = useId ( )
@@ -902,7 +906,11 @@ function Panel({
902906 closeButtonProps = { closeButtonProps }
903907 displayInViewport = { displayInViewport }
904908 // Modal variant is positioned manually so native CSS anchor positioning must not be used
905- cssAnchorPositioningSettings = { { disable : variant === 'modal' } }
909+ // Other cssAnchorPositioningSettings (e.g. fallbackStrategy) may be passed in and are forwarded here
910+ cssAnchorPositioningSettings = { {
911+ ...cssAnchorPositioningSettings ,
912+ disable : variant === 'modal' || cssAnchorPositioningSettings ?. disable ,
913+ } }
906914 >
907915 < div className = { classes . Wrapper } data-variant = { variant } data-component = "SelectPanel" >
908916 < div className = { classes . Header } data-variant = { currentResponsiveVariant } data-component = "SelectPanel.Header" >
0 commit comments