mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
refactor(console): avoid jumping when the language item is visible (#2188)
This commit is contained in:
parent
647758bdd2
commit
94ed3ea7a1
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ const LanguageItem = ({ languageTag, isSelected, onClick }: Props) => {
|
|||
|
||||
useEffect(() => {
|
||||
if (isSelected) {
|
||||
itemRef.current?.scrollIntoView(false);
|
||||
itemRef.current?.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
||||
}
|
||||
}, [isSelected]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue