From b3c83f715889373347ec6e8c671fcf535187da03 Mon Sep 17 00:00:00 2001 From: Tyler Jones Date: Mon, 22 Jun 2026 11:46:37 -0400 Subject: [PATCH 1/3] Allow settings pass through for CSS anchor positioning in SelectPanel --- packages/react/src/SelectPanel/SelectPanel.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/react/src/SelectPanel/SelectPanel.tsx b/packages/react/src/SelectPanel/SelectPanel.tsx index 95cbe2c6ad8..c9a2c7b6382 100644 --- a/packages/react/src/SelectPanel/SelectPanel.tsx +++ b/packages/react/src/SelectPanel/SelectPanel.tsx @@ -131,7 +131,10 @@ type SelectPanelVariantProps = {variant?: 'anchored'; onCancel?: () => void} | { export type SelectPanelProps = SelectPanelBaseProps & Omit & - Pick & + Pick< + AnchoredOverlayProps, + 'open' | 'height' | 'width' | 'align' | 'displayInViewport' | 'cssAnchorPositioningSettings' + > & AnchoredOverlayWrapperAnchorProps & (SelectPanelSingleSelection | SelectPanelMultiSelection) & SelectPanelVariantProps @@ -204,6 +207,7 @@ function Panel({ focusPrependedElements, virtualized, displayInViewport, + cssAnchorPositioningSettings, ...listProps }: SelectPanelProps): JSX.Element { const titleId = useId() @@ -882,7 +886,11 @@ function Panel({ closeButtonProps={closeButtonProps} displayInViewport={displayInViewport} // Modal variant is positioned manually so native CSS anchor positioning must not be used - cssAnchorPositioningSettings={{disable: variant === 'modal'}} + // Other cssAnchorPositioningSettings (e.g. fallbackStrategy) may be passed in and are forwarded here + cssAnchorPositioningSettings={{ + ...cssAnchorPositioningSettings, + disable: variant === 'modal' || cssAnchorPositioningSettings?.disable, + }} >
From 31cdfeb0ae0c312d809b74d3a7d4dc10335a7004 Mon Sep 17 00:00:00 2001 From: Tyler Jones Date: Mon, 22 Jun 2026 11:47:05 -0400 Subject: [PATCH 2/3] Add changeset --- .changeset/select-panel-css-anchor-positioning-settings.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/select-panel-css-anchor-positioning-settings.md diff --git a/.changeset/select-panel-css-anchor-positioning-settings.md b/.changeset/select-panel-css-anchor-positioning-settings.md new file mode 100644 index 00000000000..4802591550d --- /dev/null +++ b/.changeset/select-panel-css-anchor-positioning-settings.md @@ -0,0 +1,5 @@ +--- +'@primer/react': minor +--- + +SelectPanel: Forward `cssAnchorPositioningSettings` to the underlying overlay so consumers can customize CSS anchor positioning From 1246c97ba8239cc9fd02379baf39bef9f3f80496 Mon Sep 17 00:00:00 2001 From: Tyler Jones Date: Mon, 22 Jun 2026 14:07:09 -0400 Subject: [PATCH 3/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .changeset/select-panel-css-anchor-positioning-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/select-panel-css-anchor-positioning-settings.md b/.changeset/select-panel-css-anchor-positioning-settings.md index 4802591550d..2d3fc1e1b8e 100644 --- a/.changeset/select-panel-css-anchor-positioning-settings.md +++ b/.changeset/select-panel-css-anchor-positioning-settings.md @@ -2,4 +2,4 @@ '@primer/react': minor --- -SelectPanel: Forward `cssAnchorPositioningSettings` to the underlying overlay so consumers can customize CSS anchor positioning +SelectPanel: Add `cssAnchorPositioningSettings` prop to customize CSS anchor positioning behavior