Skip to content

Commit d8d4915

Browse files
authored
TabPanel: fix incorrect height for single item in left/right tabPosition in Generic theme (T1286860) (#29594)
1 parent 349afd4 commit d8d4915

8 files changed

+38
-0
lines changed

e2e/testcafe-devextreme/tests/navigation/tabPanel/common.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,3 +734,32 @@ test('TabPanel tabs min-width', async (t) => {
734734

735735
return createWidget('dxTabPanel', tabPanelOptions);
736736
});
737+
738+
['left', 'right'].forEach((tabsPosition) => {
739+
test('TabPanel should be shown correctly even if there is only one tab', async (t) => {
740+
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
741+
742+
await testScreenshot(t, takeScreenshot, `TabPanel with single tab, tabPosition=${tabsPosition}.png`, { element: '#container' });
743+
744+
await t
745+
.expect(compareResults.isValid())
746+
.ok(compareResults.errorMessages());
747+
}).before(async () => {
748+
const dataSource: Item[] = [
749+
{
750+
title: 'John Heart',
751+
text: 'John Heart',
752+
},
753+
];
754+
755+
const tabPanelOptions = {
756+
dataSource,
757+
height: 120,
758+
width: 300,
759+
showNavButtons: true,
760+
tabsPosition,
761+
};
762+
763+
return createWidget('dxTabPanel', tabPanelOptions);
764+
});
765+
});
2.75 KB
Loading
2.76 KB
Loading
2.81 KB
Loading
2.73 KB
Loading
2.75 KB
Loading
2.84 KB
Loading

packages/devextreme-scss/scss/widgets/generic/tabPanel/_index.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,13 @@
2121
@use "layout/tab-panel/position-bottom" as *;
2222
@use "layout/tab-panel/position-left" as *;
2323

24+
2425
// adduse
26+
27+
.dx-tabpanel {
28+
.dx-tabs-vertical {
29+
.dx-tabpanel-tab {
30+
flex-basis: unset;
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)