Skip to content

Commit fd0642e

Browse files
committed
Fix layout gaps on tags
1 parent 1b2c148 commit fd0642e

1 file changed

Lines changed: 27 additions & 18 deletions

File tree

  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/export

src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/export/+page.svelte

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
let exportWithFilters = $state(false);
5656
let emailOnComplete = $state(false);
5757
58+
$effect(() => {
59+
if ($tags.length === 0) {
60+
exportWithFilters = false;
61+
}
62+
});
63+
5864
let visibleColumns = $derived(showAllColumns ? $table.columns : $table.columns.slice(0, 9));
5965
let hasMoreColumns = $derived($table.columns.length > 9);
6066
let selectedColumnCount = $derived(Object.values(selectedColumns).filter(Boolean).length);
@@ -247,24 +253,27 @@
247253
description="Column names will be added as the first row in the CSV"
248254
bind:checked={includeHeader} />
249255

250-
<InputCheckbox
251-
id="exportWithFilters"
252-
label="Export with filters"
253-
description="Export rows that match the current table filters"
254-
bind:checked={exportWithFilters} />
255-
256-
{#if $tags.length > 0}
257-
<ul
258-
class="u-flex u-flex-wrap u-cross-center u-gap-8 tags"
259-
style="padding-left: 1.75rem;">
260-
<TagList
261-
tags={$tags}
262-
on:remove={(e) => {
263-
queries.removeFilter(e.detail);
264-
queries.apply();
265-
}} />
266-
</ul>
267-
{/if}
256+
<Layout.Stack gap="m">
257+
<InputCheckbox
258+
id="exportWithFilters"
259+
label="Export with filters"
260+
description="Export rows that match the current table filters"
261+
disabled={$tags.length === 0}
262+
bind:checked={exportWithFilters} />
263+
264+
{#if $tags.length > 0}
265+
<ul
266+
class="u-flex u-flex-wrap u-cross-center u-gap-8 tags"
267+
style="padding-left: 1.75rem;">
268+
<TagList
269+
tags={$tags}
270+
on:remove={(e) => {
271+
queries.removeFilter(e.detail);
272+
queries.apply();
273+
}} />
274+
</ul>
275+
{/if}
276+
</Layout.Stack>
268277

269278
<InputCheckbox
270279
id="emailOnComplete"

0 commit comments

Comments
 (0)