mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 05:16:00 +00:00
add column to JSON view
This commit is contained in:
@@ -7,17 +7,34 @@
|
||||
|
||||
import SearchBoxWrapper from '../elements/SearchBoxWrapper.svelte';
|
||||
import SearchInput from '../elements/SearchInput.svelte';
|
||||
import InputTextModal from '../modals/InputTextModal.svelte';
|
||||
import { showModal } from '../modals/modalTools';
|
||||
import ColumnManagerRow from './ColumnManagerRow.svelte';
|
||||
|
||||
export let managerSize;
|
||||
export let display: GridDisplay;
|
||||
export let isJsonView = false;
|
||||
export let isDynamicStructure = false;
|
||||
|
||||
let filter;
|
||||
</script>
|
||||
|
||||
<SearchBoxWrapper>
|
||||
<SearchInput placeholder="Search columns" bind:value={filter} />
|
||||
{#if isDynamicStructure && !isJsonView}
|
||||
<InlineButton
|
||||
on:click={() => {
|
||||
showModal(InputTextModal, {
|
||||
value: '',
|
||||
label: 'Column name',
|
||||
header: 'Add new column',
|
||||
onConfirm: name => {
|
||||
display.addDynamicColumn(name);
|
||||
},
|
||||
});
|
||||
}}>Add</InlineButton
|
||||
>
|
||||
{/if}
|
||||
<InlineButton on:click={() => display.hideAllColumns()}>Hide</InlineButton>
|
||||
<InlineButton on:click={() => display.showAllColumns()}>Show</InlineButton>
|
||||
</SearchBoxWrapper>
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
height="45%"
|
||||
show={(!freeTableColumn || isDynamicStructure) && !isFormView}
|
||||
>
|
||||
<ColumnManager {...$$props} {managerSize} {isJsonView} />
|
||||
<ColumnManager {...$$props} {managerSize} {isJsonView} {isDynamicStructure} />
|
||||
</WidgetColumnBarItem>
|
||||
|
||||
<WidgetColumnBarItem
|
||||
|
||||
Reference in New Issue
Block a user