Update auto column, export and filter buttons to new designs and to support disabled state

This commit is contained in:
Andrew Kingston 2022-04-07 15:39:14 +01:00
parent 26fec60257
commit e75df5afd3
4 changed files with 27 additions and 6 deletions

View File

@ -150,14 +150,20 @@
/>
{/if}
<HideAutocolumnButton bind:hideAutocolumns />
<!-- always have the export last -->
<ExportButton view={$tables.selected?._id} />
<ImportButton
tableId={$tables.selected?._id}
on:updaterows={onUpdateRows}
/>
<ExportButton
disabled={!hasRows || !hasCols}
view={$tables.selected?._id}
/>
{#key id}
<TableFilterButton {schema} on:change={onFilter} />
<TableFilterButton
{schema}
on:change={onFilter}
disabled={!hasCols || !hasRows}
/>
{/key}
</div>
</div>

View File

@ -3,11 +3,18 @@
import ExportModal from "../modals/ExportModal.svelte"
export let view
export let disabled = false
let modal
</script>
<ActionButton icon="DataDownload" size="S" quiet on:click={modal.show}>
<ActionButton
{disabled}
icon="DataDownload"
size="S"
quiet
on:click={modal.show}
>
Export
</ActionButton>
<Modal bind:this={modal}>

View File

@ -8,6 +8,12 @@
}
</script>
<ActionButton icon="MagicWand" primary size="S" quiet on:click={hideOrUnhide}>
{#if hideAutocolumns}Show auto columns{:else}Hide auto columns{/if}
<ActionButton
icon={hideAutocolumns ? "VisibilityOff" : "Visibility"}
primary
size="S"
quiet
on:click={hideOrUnhide}
>
Auto columns
</ActionButton>

View File

@ -5,6 +5,7 @@
export let schema
export let filters
export let disabled = false
const dispatch = createEventDispatcher()
let modal
@ -17,6 +18,7 @@
icon="Filter"
size="S"
quiet
{disabled}
on:click={modal.show}
active={tempValue?.length > 0}
>