mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-4023 sets equal window sizes on edit dataset (#2325)
* CB-4023 sets equal window sizes on edit dataset * СB-4023 sql editor sets size on displayed editors change * CB-4023 sqlEditor isEditorEmpty flag for SqlEditor --------- Co-authored-by: s.teleshev <s.teleshev@mu.se> Co-authored-by: kseniaguzeeva <112612526+kseniaguzeeva@users.noreply.github.com>
This commit is contained in:
co-authored by
s.teleshev
kseniaguzeeva
parent
bcda5ebbd8
commit
6553132019
@@ -75,15 +75,16 @@ export const SqlEditor = observer<ISqlEditorProps>(function SqlEditor({ state, c
|
||||
}
|
||||
|
||||
const displayedEditors = getComputed(() => sqlEditorModeService.tabsContainer.getDisplayed({ state, data }).length);
|
||||
const isEditorEmpty = displayedEditors === 0;
|
||||
|
||||
useEffect(() => {
|
||||
if (displayedEditors === 0) {
|
||||
if (isEditorEmpty) {
|
||||
split.fixate('maximize', true);
|
||||
} else if (split.state.disable) {
|
||||
split.fixate('resize', false);
|
||||
split.state.setSize(-1);
|
||||
}
|
||||
});
|
||||
}, [isEditorEmpty]);
|
||||
|
||||
return styled(
|
||||
styles,
|
||||
|
||||
Reference in New Issue
Block a user