add: type info. on column.

This commit is contained in:
Darshan
2025-10-18 15:52:22 +05:30
parent a0bab8b206
commit 86bd0b8d21
@@ -249,6 +249,12 @@
minimumWidth: 300,
resizable: true
},
{
id: 'type',
width: getColumnWidth('type', 150),
minimumWidth: 150,
resizable: false
},
{
id: 'indexed',
width: getColumnWidth('indexed', 150),
@@ -309,6 +315,7 @@
on:columnsResize={(resize) => saveColumnsWidth(resize.detail)}>
<svelte:fragment slot="header" let:root>
<Spreadsheet.Header.Cell column="key" {root}>Column name</Spreadsheet.Header.Cell>
<Spreadsheet.Header.Cell column="type" {root}>Type</Spreadsheet.Header.Cell>
<Spreadsheet.Header.Cell column="indexed" {root}>Indexed</Spreadsheet.Header.Cell>
<Spreadsheet.Header.Cell column="default" {root}
>Default value</Spreadsheet.Header.Cell>
@@ -413,6 +420,10 @@
{/if}
</Layout.Stack>
</Spreadsheet.Cell>
<Spreadsheet.Cell column="type" {root} isEditable={false}>
{@const columnType = column['format'] ? column['format'] : column.type}
{columnType.toLowerCase()}
</Spreadsheet.Cell>
<Spreadsheet.Cell column="indexed" {root} isEditable={false}>
{@const isActuallyIndexed = $indexes.some((index) =>
index.columns.includes(column.key)