Fix SelectPanel outside-top anchor sizing regression#7863
Conversation
|
bca1d78 to
e35f483
Compare
|
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
| selected={selected} | ||
| onSelectedChange={setSelected} | ||
| onFilterChange={setFilter} | ||
| overlayProps={{anchorSide: 'outside-top'}} |
There was a problem hiding this comment.
Unrelated change, but good to have here. The reposition story wasn't repositioning at all because we were always opening it above. Fixed the story, it works well.
e35f483 to
81dd1d1
Compare
81dd1d1 to
39a83e4
Compare
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
b884d85 to
cc3880a
Compare
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Closes github/issues#18331
Overview
When
anchorSideis'outside-top'andpinPositionis true, the SelectPanel overlay was preserving a stale inline height even when inner content needed to grow after loading. This happened because overflow was trapped in a descendant scroll container rather than on the overlay itself.The fix adds a
hasOverflowingDescendanthelper touseAnchoredPositionthat detects overflow in descendants before preserving height, and clears stale inline height when content actually needs more space.Changelog
New
AutogrowAfterLoadingWithOutsideTopAnchorstory to reproduce the regressionChanged
useAnchoredPositionnow checks descendant overflow before preserving height whenpinPositionis trueRemoved
None
Rollout strategy
Testing & Reviewing
AutogrowAfterLoadingWithOutsideTopAnchorstoryMerge checklist