Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STCOM-1282. Multiselection overlay overlapping input under certain conditions. #2269

Merged
merged 4 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Exclude invalid additional currencies. Refs STCOM-1274.
* Validate ref in `Paneset` before dereferencing it. Refs STCOM-1235.
* `<MultiSelection/>`'s overlay will use the overlay container as its boundary when the `renderToOverlay` prop is applied, as opposed to the scrollParent of the control. Refs STCOM-1282.

## [12.1.0](https://github.com/folio-org/stripes-components/tree/v12.1.0) (2024-03-12)
[Full Changelog](https://github.com/folio-org/stripes-components/compare/v12.0.0...v12.1.0)
Expand Down
6 changes: 5 additions & 1 deletion lib/MultiSelection/OptionsListWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ const OptionsListWrapper = React.forwardRef(({
}

let portal;
const adjustedModifiers = modifiers;
if (renderToOverlay) {
portal = document.getElementById('OverlayContainer');
if (adjustedModifiers.preventOverflow) {
adjustedModifiers.preventOverflow.boundariesElement = portal;
}
}

return (
Expand All @@ -28,7 +32,7 @@ const OptionsListWrapper = React.forwardRef(({
isOpen={isOpen}
portal={portal}
placement="bottom-start"
modifiers={modifiers}
modifiers={adjustedModifiers}
hideIfClosed
>
{children}
Expand Down
Loading