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:
sergeyteleshev
2024-01-24 17:37:56 +03:00
committed by GitHub
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,