Implementing a trigger event for hierarchical datagrid expand#2241
Implementing a trigger event for hierarchical datagrid expand#2241
Conversation
|
Should we add a mechanism to display a spinner while the data is being loaded when setting the loadChildren function? |
They are able to use the |
Jialecl
left a comment
There was a problem hiding this comment.
We need to discuss about this approach because I find issues with delays in case the children are not returned instantly.
|
Updates missing in the documentation. |
|
There are still problems with the selection. |

Checklist
/libdirectory./websiteas needed.Purpose
The idea of the change is being able to handle highly nested data in a more appropiate way. With the previous API we were forcing the users to load the whole dataset inside the rows item from the
DxcDatagrid. Which is not feasible most of the time due to big performance impact.Description
In order to achieve that purpose, a new prop has been added to the component,
loadChildren?: (expandChildren: HierarchyGridRow) => HierarchyGridRow[] | Promise<HierarchyGridRow[]>;. As its name says, it is an additional way of setting the children for a hierarchical data, this data can come from any type of source and is specially useful for lazy loading purposes (until you click on the expand button, the children data for that node is not processed).Additional context
There are still some edge cases which have to be reviewed as well as including additional documentation, testing and stories for the component.