Skip to content

Commit 1bcdcf6

Browse files
committed
update: lint;
update: rabbit's comment.
1 parent d99f7ec commit 1bcdcf6

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@
156156
157157
const spreadsheetColumns = $derived(mode === 'rows' ? getRowColumns() : getIndexesColumns());
158158
159-
const emptyCells = $derived(($isSmallViewport ? 14 : $isTabletViewport ? 17 : 24) + (!$expandTabs ? 2 : 0));
159+
const emptyCells = $derived(
160+
($isSmallViewport ? 14 : $isTabletViewport ? 17 : 24) + (!$expandTabs ? 2 : 0)
161+
);
160162
</script>
161163

162164
<div

src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/columns/types/relationship.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112
}
113113
114114
function getAvailableOptions(excludeIndex?: number): SelectOption[] {
115-
return options?.filter((option) => {
115+
const source = options ?? [];
116+
return source?.filter((option) => {
116117
const otherItems =
117118
excludeIndex !== undefined
118119
? relatedList.filter((_, idx) => idx !== excludeIndex)

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@
9494
$createRow.row = prepareRowPayload($createRow);
9595
9696
try {
97-
const row = await sdk.forProject(page.params.region, page.params.project).tablesDB.createRow({
98-
databaseId: page.params.database,
99-
tableId: page.params.table,
100-
rowId: $createRow.id ?? ID.unique(),
101-
data: $createRow.row,
102-
permissions: $createRow.permissions
103-
});
97+
const row = await sdk
98+
.forProject(page.params.region, page.params.project)
99+
.tablesDB.createRow({
100+
databaseId: page.params.database,
101+
tableId: page.params.table,
102+
rowId: $createRow.id ?? ID.unique(),
103+
data: $createRow.row,
104+
permissions: $createRow.permissions
105+
});
104106
105107
addNotification({
106108
message: 'Row has been created',

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,13 @@
111111
const organizationId = data.organization.$id ?? data.project.teamId;
112112
113113
const minimumWidth = 168;
114-
const emptyCellsLimit = $spreadsheetLoading ? 30 : $isSmallViewport ? 12 : $isTabletViewport ? 18 : 24;
114+
const emptyCellsLimit = $spreadsheetLoading
115+
? 30
116+
: $isSmallViewport
117+
? 12
118+
: $isTabletViewport
119+
? 18
120+
: 24;
115121
116122
let selectedRows = [];
117123
let spreadsheetContainer: SpreadsheetContainer;

0 commit comments

Comments
 (0)