mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 04:16:00 +00:00
feat: make summary table sortable, filtrable, with sticky header
This commit is contained in:
@@ -1,16 +1,28 @@
|
||||
<script lang="ts">
|
||||
import { writable } from 'svelte/store';
|
||||
import TableControl from '../elements/TableControl.svelte';
|
||||
import JSONTree from '../jsontree/JSONTree.svelte';
|
||||
import { _t } from '../translations';
|
||||
export let variables: { variable: string; value: any }[] = [];
|
||||
|
||||
const filters = writable({});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<TableControl
|
||||
stickyHeader
|
||||
rows={variables}
|
||||
{filters}
|
||||
columns={[
|
||||
{ header: _t('summaryVariables.variable', { defaultMessage: 'Variable' }), fieldName: 'variable' },
|
||||
{
|
||||
sortable: true,
|
||||
filterable: true,
|
||||
header: _t('summaryVariables.variable', { defaultMessage: 'Variable' }),
|
||||
fieldName: 'variable',
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
filterable: true,
|
||||
header: _t('summaryVariables.value', { defaultMessage: 'Value' }),
|
||||
fieldName: 'value',
|
||||
slot: 0,
|
||||
|
||||
Reference in New Issue
Block a user