delete item by id using useDelete()
hi all
Iam trying to delete a specific item from the DB by ID
the steps like that:
1) we have a data table which includes items and the last column in the data Table have two buttons (delete and edit)
2) when I click on delete I open an external component (which is a dialog) and ask if the user sure to delete the item
3) if click no I close the dialog if click yes I want to delete the item
the issue I face that I send to the Dialog component the delete function with the product id, but when I define the delete function I get error that the ID is not define
code:
the error is: Binding element 'id' implicitly has an 'any' type.ts(7031)
how I can solve this error ?
Iam trying to delete a specific item from the DB by ID
the steps like that:
1) we have a data table which includes items and the last column in the data Table have two buttons (delete and edit)
2) when I click on delete I open an external component (which is a dialog) and ask if the user sure to delete the item
3) if click no I close the dialog if click yes I want to delete the item
the issue I face that I send to the Dialog component the delete function with the product id, but when I define the delete function I get error that the ID is not define
code:
the error is: Binding element 'id' implicitly has an 'any' type.ts(7031)
how I can solve this error ?
