qury designer fix

This commit is contained in:
Jan Prochazka
2021-04-17 20:41:42 +02:00
parent 90af165afd
commit 08d6f83a48

View File

@@ -1,4 +1,4 @@
<script lang="ts" context="module"> <script context="module">
function getTableDisplayName(column, tables) { function getTableDisplayName(column, tables) {
const table = (tables || []).find(x => x.designerId == column.designerId); const table = (tables || []).find(x => x.designerId == column.designerId);
if (table) return table.alias || table.pureName; if (table) return table.alias || table.pureName;
@@ -6,7 +6,7 @@
} }
</script> </script>
<script lang="ts"> <script>
import { map } from 'lodash'; import { map } from 'lodash';
import DataFilterControl from '../datagrid/DataFilterControl.svelte'; import DataFilterControl from '../datagrid/DataFilterControl.svelte';
import { findDesignerFilterType } from '../designer/designerTools'; import { findDesignerFilterType } from '../designer/designerTools';
@@ -41,7 +41,8 @@
$: hasGroupedColumn = !!(columns || []).find(x => x.isGrouped); $: hasGroupedColumn = !!(columns || []).find(x => x.isGrouped);
</script> </script>
<TableControl <div class="wrapper">
<TableControl
rows={columns || []} rows={columns || []}
columns={[ columns={[
{ fieldName: 'columnName', header: 'Column/Expression' }, { fieldName: 'columnName', header: 'Column/Expression' },
@@ -55,7 +56,7 @@
hasGroupedColumn && { fieldName: 'groupFilter', header: 'Group filter', slot: 6 }, hasGroupedColumn && { fieldName: 'groupFilter', header: 'Group filter', slot: 6 },
{ fieldName: 'actions', header: '', slot: 7 }, { fieldName: 'actions', header: '', slot: 7 },
]} ]}
> >
<svelte:fragment slot="0" let:row> <svelte:fragment slot="0" let:row>
<CheckboxField <CheckboxField
checked={row.isOutput} checked={row.isOutput}
@@ -133,4 +134,12 @@
<svelte:fragment slot="7" let:row> <svelte:fragment slot="7" let:row>
<InlineButton on:click={() => removeColumn(row)}>Remove</InlineButton> <InlineButton on:click={() => removeColumn(row)}>Remove</InlineButton>
</svelte:fragment> </svelte:fragment>
</TableControl> </TableControl>
</div>
<style>
.wrapper {
overflow: auto;
flex: 1;
}
</style>