1
0
mirror of synced 2026-08-04 17:27:13 +00:00

FIX: Reset table properties after building table

Ensures data is cleared after building a table so that additional tables can be build without remaining old data.
This commit is contained in:
Keegan George
2022-07-04 16:31:11 -07:00
parent 9354a5576b
commit 867ea71ceb
@@ -9,6 +9,13 @@ export default class extends Controller {
{ column: 2, rows: A([{ id: 1 }]) },
]);
resetData() {
this.tableItems = A([
{ column: 1, rows: A([{ id: 1 }]) },
{ column: 2, rows: A([{ id: 1 }]) },
]);
}
@action
cancelTableCreation() {
this.send("closeModal");
@@ -80,6 +87,7 @@ export default class extends Controller {
@action
createTable() {
this.buildTable(this.tableItems);
this.resetData();
this.send("closeModal");
}