Skip to content

Commit ffd3b5c

Browse files
committed
fix: Tab View - scrollable + activeIndex should scroll to header item, Fixes #8259
1 parent 1aeb069 commit ffd3b5c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

components/lib/tabview/TabView.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ export const TabView = React.forwardRef((inProps, ref) => {
308308
if (!idState) {
309309
setIdState(UniqueComponentId());
310310
}
311+
312+
contentRef.current.style.scrollPaddingInline = Math.max(DomHandler.getWidth(prevBtnRef.current), DomHandler.getWidth(nextBtnRef.current), 0) + 'px';
313+
updateScrollBar({ index: props.activeIndex });
311314
});
312315

313316
useUpdateEffect(() => {

0 commit comments

Comments
 (0)