update: lint;

update: rabbit's comment.
This commit is contained in:
ItzNotABug
2025-09-20 13:58:48 +05:30
parent d99f7ec3e0
commit 1bcdcf650a
4 changed files with 21 additions and 10 deletions
@@ -156,7 +156,9 @@
const spreadsheetColumns = $derived(mode === 'rows' ? getRowColumns() : getIndexesColumns());
const emptyCells = $derived(($isSmallViewport ? 14 : $isTabletViewport ? 17 : 24) + (!$expandTabs ? 2 : 0));
const emptyCells = $derived(
($isSmallViewport ? 14 : $isTabletViewport ? 17 : 24) + (!$expandTabs ? 2 : 0)
);
</script>
<div
@@ -112,7 +112,8 @@
}
function getAvailableOptions(excludeIndex?: number): SelectOption[] {
return options?.filter((option) => {
const source = options ?? [];
return source?.filter((option) => {
const otherItems =
excludeIndex !== undefined
? relatedList.filter((_, idx) => idx !== excludeIndex)
@@ -94,13 +94,15 @@
$createRow.row = prepareRowPayload($createRow);
try {
const row = await sdk.forProject(page.params.region, page.params.project).tablesDB.createRow({
databaseId: page.params.database,
tableId: page.params.table,
rowId: $createRow.id ?? ID.unique(),
data: $createRow.row,
permissions: $createRow.permissions
});
const row = await sdk
.forProject(page.params.region, page.params.project)
.tablesDB.createRow({
databaseId: page.params.database,
tableId: page.params.table,
rowId: $createRow.id ?? ID.unique(),
data: $createRow.row,
permissions: $createRow.permissions
});
addNotification({
message: 'Row has been created',
@@ -111,7 +111,13 @@
const organizationId = data.organization.$id ?? data.project.teamId;
const minimumWidth = 168;
const emptyCellsLimit = $spreadsheetLoading ? 30 : $isSmallViewport ? 12 : $isTabletViewport ? 18 : 24;
const emptyCellsLimit = $spreadsheetLoading
? 30
: $isSmallViewport
? 12
: $isTabletViewport
? 18
: 24;
let selectedRows = [];
let spreadsheetContainer: SpreadsheetContainer;