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.
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. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
0f740aa to
c85b1d2
Compare
Closes github/issues#18331
Note: We may not need this at all if css anchor positioning solves this. I tested my bug repro and does seem like it.
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