From 4510003e18bfb53804e52a534fbf1918c8878904 Mon Sep 17 00:00:00 2001 From: Melloware Date: Sun, 8 May 2022 07:58:31 -0400 Subject: [PATCH] Fix #2855: MultiSelect scrollIntoView nearest (#2858) --- 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 eb2c45fa0b..4ab176265a 100644 --- a/components/lib/multiselect/MultiSelect.js +++ b/components/lib/multiselect/MultiSelect.js @@ -215,7 +215,7 @@ export const MultiSelect = React.memo(React.forwardRef((props, ref) => { const scrollInView = () => { const highlightItem = DomHandler.findSingle(overlayRef.current, 'li.p-highlight'); if (highlightItem && highlightItem.scrollIntoView) { - highlightItem.scrollIntoView({ block: 'nearest', inline: 'start' }); + highlightItem.scrollIntoView({ block: 'nearest', inline: 'nearest' }); } }