Skip to content

Commit

Permalink
[@mantine/core] Fix Select/MultiSelect scrolling page when `transitio…
Browse files Browse the repository at this point in the history
…nProps` are set (#4327)
  • Loading branch information
lawff committed May 30, 2023
1 parent 9eb028b commit 620cb7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mantine-core/src/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export const Select = forwardRef<HTMLInputElement, SelectProps>((props, ref) =>
window.setTimeout(() => {
targetRef.current = itemsRefs.current[filteredData[selectedItemIndex]?.value];
scrollIntoView({ alignment: isColumn ? 'end' : 'start' });
}, 0);
}, 50);

useDidUpdate(() => {
if (shouldShowDropdown) scrollSelectedItemIntoView();
Expand Down

0 comments on commit 620cb7e

Please sign in to comment.