From 010eab5e91f5ff6e28548b37352de11ce75c182b Mon Sep 17 00:00:00 2001 From: Et7f3 Date: Wed, 16 Oct 2024 13:35:26 +0200 Subject: [PATCH] MultiSelect: Allow to be inline on first render. (#7342) * 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 --------- Co-authored-by: Melloware --- components/lib/multiselect/MultiSelect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/multiselect/MultiSelect.js b/components/lib/multiselect/MultiSelect.js index 02bd215b86..20f3af5ebf 100644 --- a/components/lib/multiselect/MultiSelect.js +++ b/components/lib/multiselect/MultiSelect.js @@ -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) => {