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:
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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue