Skip to content

Commit

Permalink
fix: make options scroll to nearest block
Browse files Browse the repository at this point in the history
affects: @medly-components/core, @medly-components/forms
  • Loading branch information
gmukul01 committed Jan 26, 2025
1 parent ac28277 commit cea7a4f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Component: FC<OptionsProps> = memo(
const optionsRef = useCombinedRefs<HTMLUListElement>(ref, useRef(null));

useEffect(() => {
optionsRef?.current?.scrollIntoView({ behavior: 'smooth' });
optionsRef?.current?.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
}, []);

return (
Expand Down

0 comments on commit cea7a4f

Please sign in to comment.