Skip to content

Commit 30ccca0

Browse files
committed
bug: tabComponents layout direction wrong
1 parent 125f112 commit 30ccca0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

packages/dockview-core/src/dockview/dockviewGroupPanel.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
height: 100%;
44
background-color: var(--dv-group-view-background-color);
55
overflow: hidden;
6+
flex-direction: column;
67

78
&:focus {
89
outline: none;
@@ -14,10 +15,6 @@
1415
outline: none;
1516
}
1617

17-
&.dv-groupview-header-top {
18-
flex-direction: column;
19-
}
20-
2118
&.dv-groupview-header-bottom {
2219
flex-direction: column-reverse;
2320
}

packages/docs/sandboxes/nativeapp-dockview/src/app.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ const components = {
2525
);
2626
},
2727
isolatedApp: (
28-
props: IDockviewPanelProps<{ title: string; x?: number }>
28+
props: IDockviewPanelProps<{
29+
title: string;
30+
x?: number;
31+
vertical?: boolean;
32+
}>
2933
) => {
3034
const onReady = (event: DockviewReadyEvent) => {
3135
const panel1 = event.api.addPanel({
@@ -49,6 +53,9 @@ const components = {
4953
title: 'Tab 3',
5054
},
5155
});
56+
if(props.params.vertical){
57+
panel1.group.headerPosition = 'left'
58+
}
5259
};
5360
return (
5461
<DockviewReact
@@ -113,6 +120,7 @@ const DockviewNative2 = (props: { theme?: string }) => {
113120
tabComponent: 'default',
114121
params: {
115122
title: 'Window 3',
123+
vertical: true,
116124
},
117125
position: {
118126
direction: 'below',

0 commit comments

Comments
 (0)