Skip to content

Commit

Permalink
MultiSelect: Allow to be inline on first render. (#7342)
Browse files Browse the repository at this point in the history
* MultiSelect: Allow to be inline on first render.

fix #7341

* MultiSelect: don't align when inline.

Their is no parent when we are inline so overlayRef is empty.

Co-authored-by: Melloware <[email protected]>

---------

Co-authored-by: Melloware <[email protected]>
  • Loading branch information
Et7f3 and melloware authored Oct 16, 2024
1 parent 222190f commit 010eab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/multiselect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ export const MultiSelect = React.memo(
};

const alignOverlay = () => {
DomHandler.alignOverlay(overlayRef.current, labelContainerRef.current.parentElement, props.appendTo || (context && context.appendTo) || PrimeReact.appendTo);
!props.inline && DomHandler.alignOverlay(overlayRef.current, labelContainerRef.current.parentElement, props.appendTo || (context && context.appendTo) || PrimeReact.appendTo);
};

const isClearClicked = (event) => {
Expand Down

0 comments on commit 010eab5

Please sign in to comment.