Skip to content

Commit

Permalink
fix(Tabs): select tab do not vertical scroll into view (carbon-design…
Browse files Browse the repository at this point in the history
…-system#6974)

* fix(Tabs): select tab do not vertical scroll into view

* fix(Tabs): change argument type for scrollIntoView api

change experimental argument to non experimental argument type

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and tw15egan committed Oct 7, 2020
1 parent 744f76d commit c127937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/Tabs/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default class Tabs extends React.Component {
event.type === 'click'
) {
const currentScrollLeft = this.state.tablistScrollLeft;
tab?.tabAnchor?.scrollIntoView({ inline: 'nearest' });
tab?.tabAnchor?.scrollIntoView(false);
const newScrollLeft = this.tablist.current.scrollLeft;
if (newScrollLeft > currentScrollLeft) {
this.tablist.current.scrollLeft += this.OVERFLOW_BUTTON_OFFSET;
Expand Down

0 comments on commit c127937

Please sign in to comment.