You need to sign in to do that
Don't have an account?
Brian11
datatable selectedRows not working
Hello,
For some reason selected rows on the datatable component is not working this is what I currently have. the selectedrows are being created when the component renders. my init function. I've hard coded it here thinking it would work. Any Advice?
Component
For some reason selected rows on the datatable component is not working this is what I currently have. the selectedrows are being created when the component renders. my init function. I've hard coded it here thinking it would work. Any Advice?
Component
<aura:attribute name="selectedRows" type="List" default="['a020m000001Uq00AAC']" <lightning:datatable columns="{! v.headerFields }" data="{! v.data }" keyField="Id" showRowNumberColumn="false" resizeColumnDisabled="true" selectedRows="{!v.selectedRows }" />
Refer this link
https://salesforce.stackexchange.com/questions/207190/lightningdatatable-preselect-rows
I try assigning the component to itself like your example above but it doesnt work. It actually breaks my component. Can you show me an example?
component = component.find()