You need to sign in to do that
Don't have an account?
Kartik Bhalla
how to remove record from the list when I am unchecking the row of that record in JS file of aura component?
I am not able to figure out anything. I used splice method to remove the item from array but it is not removing that item of the checkbox which I am unchecking. Please help If there is any other solution.
You can use the filter method to remove the selected item. Below is the snippet which I have used in LWC. You should be able to use on similar lines.
let selectedRecords = this.template.querySelector('[data-id="recordDataTable"]').getSelectedRows();
Then get the selectedRowId from selectedRecords.
Once you have the selectedRowId, then apply filter on the records.
this.records = this.records.filter(var => var.TheId !== selectedRowId);
can u tell me how to use this in aura component?