Skip to content

Commit 5cd3625

Browse files
Copilotstnguyen90
andcommitted
Refactor: Simplify hidden column check in header rendering
Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
1 parent c12f282 commit 5cd3625

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

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

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -814,9 +814,7 @@
814814
}}>
815815
<svelte:fragment slot="header" let:root>
816816
{#each $tableColumns as column (column.id)}
817-
{#if column.hide}
818-
<!-- Skip hidden columns -->
819-
{:else if column.isAction}
817+
{#if column.isAction}
820818
<Spreadsheet.Header.Cell column="actions" {root}>
821819
<Tooltip>
822820
<Button.Button
@@ -835,7 +833,7 @@
835833
<span slot="tooltip"> Create column </span>
836834
</Tooltip>
837835
</Spreadsheet.Header.Cell>
838-
{:else}
836+
{:else if !column.hide}
839837
{@const structureColumn = $columns.find((col) => col.key === column.id)}
840838
<SheetOptions
841839
type="header"

0 commit comments

Comments
 (0)