-
Notifications
You must be signed in to change notification settings - Fork 17
Implementing a trigger event for hierarchical datagrid expand #2241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to discuss about this approach because I find issues with delays in case the children are not returned instantly.
Checklist
/lib
directory./website
as 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.