-
Notifications
You must be signed in to change notification settings - Fork 273
fix(ui5-tabcontainer): update tabs in strip properly #11235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
tabs no longer change position when selected Fixes: #11087
Fixes lint errors
@@ -1115,6 +1133,9 @@ class TabContainer extends UI5Element { | |||
} | |||
|
|||
_hasStartOverflow(containerWidth: number, itemsDomRefs: Array<TabInStrip | TabSeparatorInStrip>, selectedItemIndexAndWidth: { width: number; index: number}) { | |||
if (this._getStartOverflow().textContent !== "+0") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is needed.
@@ -990,11 +990,28 @@ class TabContainer extends UI5Element { | |||
let allItemsWidth = 0; | |||
|
|||
const itemsDomRefs = this.items.map(item => item.getDomRefInStrip()) as Array<TabInStrip | TabSeparatorInStrip>; | |||
let allVisibleItemsWidth = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can move all of the new logic to the _updateStartAndEndOverflow method, as it is valid only for this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add test
tabs no longer change position when selected
Fixes: #11087