Skip to Content

Expand SAPUI5 TreeTable after saving

Hi everyone,

with an editable sap.ui.table.TreeTable when user saves changes, data are refreshed using a GET request to backend and table is re-rendered. Unfortunately, expanded nodes of table are not saved and user has to expand manually again.

Exemple:

We use "Apply to selection" button to save changes made on this tree table. We can see that first and second row are expanded before we click save button.

When save is done, table is refreshed and is not expanded anymore.

I know I can expand to a predetermined level by default, but what I want is to keep the same expanded state that user has before save.

We already tried to save expanded nodes ids and expand these nodes in "onAfterRendering" event of the tree table, but this event is fired too early: table is not completely generated and treeTable.expand() method doesn't work.

Any help would be appreciated :-)

Regards

save-tree-1.jpg (40.9 kB)
save-tree-2.jpg (29.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

0 Answers