Skip to content

Question regarding the use of onRowsDelete. #853

@maitedev

Description

@maitedev

Hi, I have a question regarding the use of onRowsDelete.
I want to use the following function to remove items from the table, but I don't know if I am using it correctly combined with the option onRowsDelete Thanks in advance.

handleDeleteUser = (idToDelete) => {
axios.delete(https://jsonplaceholder.typicode.com/users/${idToDelete})
.then(response => {
console.log(response);
})
.catch(error => {
console.log(error);
});
};
render() {
const options = {
onRowsDelete: (rowsDeleted) => {
const idsToDelete = rowsDeleted.data.map(item => item.dataIndex)
idsToDelete.map(idToDelete => this.handleDeleteUser(idToDelete))
}
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions