You need to sign in to do that
Don't have an account?
smita bhargava
select All checkbox in datatable
I am having a lightning component datatable with 2 rows each row having a check box.
when I select a checkbox at headlevel then it shud select all rows and when I deselect header level checkbox it will deselect all below chekcboxex. I have atatched a screen for the same.
I saw couple of posts but I am not clear on how to proceed.
a working piece of code will be really helpful to understand.
<c:GPS_COMP_DataTableUtility
keyField = "id"
tableData="{!v.tableData}"
tableColumns="{!v.columns}" hideCheckboxColumn="false"
maxRowSelection="{!v.maxRowSelection}"
selectedRows="{!v.selectedRows}"/>
Thanks
smita
when I select a checkbox at headlevel then it shud select all rows and when I deselect header level checkbox it will deselect all below chekcboxex. I have atatched a screen for the same.
I saw couple of posts but I am not clear on how to proceed.
a working piece of code will be really helpful to understand.
<c:GPS_COMP_DataTableUtility
keyField = "id"
tableData="{!v.tableData}"
tableColumns="{!v.columns}" hideCheckboxColumn="false"
maxRowSelection="{!v.maxRowSelection}"
selectedRows="{!v.selectedRows}"/>
Thanks
smita
Greetings!
This kind of functionality in the data table, you can implement from this reference
https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example#lightningcomponentdemo:exampleDatatableBase
Please mark it as the best answer if it helps you to fix the issue.
Thank you!
Regards,
Suraj Tripathi