Skip to content

Commit b3a9734

Browse files
author
Ives van Hoorne
committed
Also close workspace item when bar size = 0
1 parent fbb3983 commit b3a9734

File tree

1 file changed

+6
-4
lines changed
  • packages/app/src/app/pages/Sandbox/Editor

1 file changed

+6
-4
lines changed

packages/app/src/app/pages/Sandbox/Editor/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ function ContentSplit({ signals, store, match }) {
5858
minSize={0}
5959
onDragStarted={() => signals.editor.resizingStarted()}
6060
onDragFinished={() => signals.editor.resizingStopped()}
61-
resizerStyle={{
62-
visibility: store.workspace.openedWorkspaceItem
63-
? 'visible'
64-
: 'hidden',
61+
onChange={size => {
62+
if (size > 0 && !store.workspace.openedWorkspaceItem) {
63+
signals.workspace.setWorkspaceItem({ item: 'files' });
64+
} else if (size === 0 && store.workspace.openedWorkspaceItem) {
65+
signals.workspace.setWorkspaceItem({ item: null });
66+
}
6567
}}
6668
pane1Style={{
6769
visibility: store.workspace.openedWorkspaceItem

0 commit comments

Comments
 (0)