You need to sign in to do that
Don't have an account?
Sohan Shirodkar
This is how I am using treegrid component.
When I expand a treegrid row, and then collapse it, automatically onrowselection event is fired, which calls onRowSelection action handler in JS controller.
I have made an important observation. This issue occurs in the following scenario:
1) Expand a row (onrowtoggle fired)
2) Select a child row(onrowselection fired)
3) Collapse the parent row (onrowtoggle fired + onrowselection fired)
I believe step 3 internally deselects the child row selected in step 2 which results in firing of onrowselect event. This is certainly a faulty behaviour.
How can I prevent this or at least handle it?
Lightning:treegrid ontoggle action triggers onrowselection
<lightning:treeGrid aura:id="accountsTreeComponent" columns="{!v.gridColumns}" data="{!v.gridData}" keyField="accountId" expandedRows="{! v.gridExpandedRows }" isLoading="{! v.isLoading }" ontoggle="{! c.handleRowToggle }" onrowselection="{!c.onRowSelection}"/>
This is how I am using treegrid component.
When I expand a treegrid row, and then collapse it, automatically onrowselection event is fired, which calls onRowSelection action handler in JS controller.
I have made an important observation. This issue occurs in the following scenario:
1) Expand a row (onrowtoggle fired)
2) Select a child row(onrowselection fired)
3) Collapse the parent row (onrowtoggle fired + onrowselection fired)
I believe step 3 internally deselects the child row selected in step 2 which results in firing of onrowselect event. This is certainly a faulty behaviour.
How can I prevent this or at least handle it?
any guideance would be greatly appreciated!