Web: Components: Fix TabsContainer primary tab position

This commit is contained in:
Aleksandr Lushkin 2023-07-20 22:43:18 +02:00
parent bf24041594
commit bab27d2c2f

View File

@ -128,7 +128,8 @@ class TabContainer extends Component {
rightTabs--;
}
rightFullWidth -= marginRight;
this.scrollRef.current?.scrollTo(this.scrollRef.current.scrollHeight, 0);
const staticScroll = this.scrollRef.current?.scrollWidth; //get static scroll width
this.scrollRef.current?.scrollTo(staticScroll - rightFullWidth);
};
onMouseEnter = () => {
@ -155,7 +156,6 @@ class TabContainer extends Component {
autoHide={onScrollHide}
stype="preMediumBlack"
className="scrollbar"
horizontal
ref={this.scrollRef}
>
<NavItem className="className_items">