function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kartik BhallaKartik 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.
RohitJRohitJ
Hi,

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);
Kartik BhallaKartik Bhalla
Hi RohitJ,

can u tell me how to use this in aura component?