Skip to content

Commit 6832224

Browse files
committed
fix: selection and deletion bug on spreadsheet.
1 parent 28d90a2 commit 6832224

File tree

1 file changed

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

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,16 @@
104104
};
105105
106106
$: rows = writable(data.rows);
107-
$: if (rows) {
107+
$: if ($rows) {
108108
paginatedRows.clear();
109109
paginatedRows.setPage(1, $rows.rows);
110+
111+
const hashedKey = hash($rows.total.toString());
112+
113+
if ($spreadsheetRenderKey !== hashedKey) {
114+
/* reset ui when the underlying data changes */
115+
spreadsheetRenderKey.set(hash(data.rows.total.toString()));
116+
}
110117
}
111118
112119
const tableId = page.params.table;

0 commit comments

Comments
 (0)