Fix prod bug where screens are not deleted when the backing table is

This commit is contained in:
Andrew Kingston 2023-08-25 12:29:32 +01:00
parent 22f34d83ee
commit 2bbdb5ce46
1 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,10 @@
const isSelected = $params.tableId === table._id
try {
await tables.delete(table)
await store.actions.screens.delete(templateScreens)
// Screens need deleted one at a time because of undo/redo
for (let screen of templateScreens) {
await store.actions.screens.delete(screen)
}
if (table.type === "external") {
await datasources.fetch()
}