fix: truncating column name.

This commit is contained in:
Darshan
2025-09-29 11:29:14 +05:30
parent d7f2493606
commit e19e6c8c19
@@ -51,6 +51,7 @@
import { type Models } from '@appwrite.io/console';
import { preferences } from '$lib/stores/preferences';
import { page } from '$app/state';
import { formatName } from '$lib/helpers/string';
const updatedColumnsForSheet = $derived.by(() => {
const baseAttrs = [
@@ -182,6 +183,10 @@
return `Type: ${formattedType}`;
}
function isSystemColumnKey(column: Columns) {
return column.key.startsWith('$');
}
onDestroy(() => ($showCreateColumnSheet.show = false));
$effect(() => {
@@ -270,10 +275,14 @@
alignItems="center"
gap="xxs">
<Typography.Text truncate>
{#if column.key === '$id' || column.key === '$sequence' || column.key === '$createdAt' || column.key === '$updatedAt'}
{#if isSystemColumnKey(column)}
{column.key}
{:else}
{column.key} {column.array ? '[]' : undefined}
{@const key = !column.required
? column.key
: formatName(column.key, 6)}
{key}
{column.array ? '[]' : undefined}
{/if}
</Typography.Text>
{#if isString(column) && column.encrypt}