Skip to content

Commit f6b47b1

Browse files
committed
address comment.
1 parent 6c96787 commit f6b47b1

File tree

1 file changed

+1
-14
lines changed
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]

1 file changed

+1
-14
lines changed

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import { preferences } from '$lib/stores/preferences';
1111
import { sdk } from '$lib/stores/sdk';
1212
import type { Models } from '@appwrite.io/console';
13-
import { afterUpdate, onMount } from 'svelte';
13+
import { onMount } from 'svelte';
1414
import type { PageData } from './$types';
1515
import {
1616
isRelationship,
@@ -46,21 +46,8 @@
4646
4747
onMount(async () => {
4848
displayNames = preferences.getDisplayNames();
49-
updateMaxWidth();
5049
});
5150
52-
function updateMaxWidth() {
53-
const tableCells = Array.from(document.querySelectorAll('.less-width-truncated'));
54-
55-
const visibleColumnsCount = $columns.filter((col) => !col.hide).length;
56-
const newMaxWidth = Math.max(50 - (visibleColumnsCount - 1) * 5, 25);
57-
58-
tableCells.forEach((cell) => {
59-
const cellItem = cell as HTMLElement;
60-
cellItem.style.maxWidth = `${newMaxWidth}vw`;
61-
});
62-
}
63-
6451
function formatArray(array: unknown[]) {
6552
if (array.length === 0) return '[ ]';
6653

0 commit comments

Comments
 (0)