fix(app): database studio/empty table count reset

This commit is contained in:
Ruben Fiszel
2024-08-20 18:11:57 +02:00
parent 4f00120d2b
commit d6d33898a7
2 changed files with 9 additions and 2 deletions
@@ -35,10 +35,12 @@
let localColumnDefs = columnDefs
let lastTable = table
$: {
$: lastTable != undefined && table && onTableChange()
function onTableChange() {
if (table !== lastTable) {
localColumnDefs = []
lastTable = table
localColumnDefs = []
}
}
@@ -230,6 +230,11 @@
input: getCountInput(resourceValue, tableValue, dbType, columnDefs, whereClause),
id: x.id + '_count'
})
console.log(
x.id,
getCountInput(resourceValue, tableValue, dbType, columnDefs, whereClause),
columnDefs
)
r.push({
input: getInsertInput(tableValue, columnDefs, resourceValue, dbType),
id: x.id + '_insert'