New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleting rows with Action Button #340
Comments
Hi @hamodey,
function deleteRow(indexToRemove) {
setState((prevState) =>
prevState.filter((row, index) => index !== indexToRemove)
);
}
const grid = state.map((rowData, index) => {
return [
{ value: rowData.firstName },
{ value: rowData.lastName },
{
forceComponent: true,
component: <button onClick={removeRow.bind(this, index)}>Delete Row</button>,
},
];
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I have a datasheet that works great and fine, however I would like to add an "Action" column at the end of the datasheet to be able to delete the current row.
So all rows will have a delete button and I can delete that row and the size of the sheet will get smaller.
Thanks
The text was updated successfully, but these errors were encountered: