1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Use scrollIntoViewIfNeeded in tabs

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-03-18 12:50:44 +03:00
parent 7736589738
commit b3de1791e0

View File

@ -81,10 +81,7 @@ export class Tab extends React.PureComponent<TabProps> {
}
scrollIntoView() {
this.ref.current?.scrollIntoView?.({
behavior: "smooth",
inline: "center",
});
this.ref.current?.scrollIntoViewIfNeeded();
}
@boundMethod