column editor dialog

This commit is contained in:
Jan Prochazka
2021-06-10 12:48:03 +02:00
parent 3ad665f80b
commit 697a9438c6
5 changed files with 82 additions and 6 deletions

View File

@@ -5,6 +5,8 @@
</script>
<script lang="ts">
import { generateTableGroupId } from 'dbgate-tools';
import _ from 'lodash';
import ColumnLabel from '../elements/ColumnLabel.svelte';
@@ -25,9 +27,12 @@
export let objectTypeField = 'tables';
$: tableInfo = useDbCore({ conid, database, schemaName, pureName, objectTypeField });
$: tableInfoWithGroupId = $tableInfo ? generateTableGroupId($tableInfo) : null;
const { editorState, editorValue, setEditorData } = useEditorData({ tabid });
$: showTable = $editorValue || tableInfoWithGroupId;
</script>
<TableEditor {tableInfo} />
<TableEditor tableInfo={showTable} setTableInfo={objectTypeField == 'tables' ? setEditorData : null} />