I am using typescript for views and controllers for this one. I just want to store the expanded state of nodes of TreeTable somewhere when table is filtered and restore if table is not filtered anymore. Sample code below is the controller.
public class HomeController extends Controller {
model = new JSONModel();
data = {
treeTableData: [
{
description: "Node 1",
expanded: true,
items: [
description: "Node 1",
expanded: false,
items: [/* More items */]
]
},
/* More items */
]
}
// Store here temporarily the last state if table is filtered
lastTreeTableState;
public onInit(): void {
const view = this.getView();
this.model.setData(this.data);
view.setModel(this.model);
}
}
Thanks everyone!
Just try searching online and even consult through ChatGPT but I don’t think they are the best solution.
New contributor
Jetsun Prince Torres is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.