Hi, I want to remove row based on index but while I am removing the row and getting splice is not a function. Removed row is shown in the console but not updating row. Could you please help me anyone and pasting the code.
const handleRemoveXAPIValues = (index) => {
setAnchorEl(null);
console.log(“XAPIStatement”, xapiStatment);
let removeSelectedRow = […removeXAPiRow];
// console.log(“removeSelectedRow”, removeSelectedRow);
// removeSelectedRow.splice(index, 1);
// setRemoveXAPIRow(removeSelectedRow);
removeSelectedRow[0].object.map((item) => {
let xapiValues = item;
console.log(“xapiValues”, xapiValues)
xapiValues.splice(index, 1);
console.log(“xapiValuesTwo”, xapiValues);
setRemoveXAPIRow(xapiValues);
})
//handleRemove(index);
}