DataGrid: HirearchyColumn refactored InitiallyExpandedFunc #9728
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
InitiallyExpandedFunc was not working, this refactor should fix the issues.
Description
The InitiallyExpandedFunc that I previously introduced seems to have been borked by another feature. From what i can tell now only one Hirearchy column is created. I am unsure how this would work but from debugging my Func only gets called called once for the first item. Meaning you could only expand the first column.
This should resolve #9681 as I tested on a project with live updates and it worked mostly as expected. If new items are added to the component this function will not be called on those functions. If I remove the check the feature will break as expanding the row will cause a rerender meaning an infinite render loop.
If someone knows why the column and this Func only gets evaluated once and not once per row. This could lead to a better fix.
How Has This Been Tested?
Tested manually with complex real world project
Type of Changes
Checklist
dev
).