Delete an item from the Datatable
Delete an item from the Datatable
klermann
Posts: 277Questions: 67Answers: 1
Hi, Allan. When I try to delete an item from the Datatable, the delete button does not work on the first try, only after updating an item is that the item can be deleted, but when loading the table for the first time does not delete ...
user: admin@admin.com
pass:admin
ec2-34-224-65-226.compute-1.amazonaws.com:8080/financeiro/minhasContas/
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi klermann, if you have any validation code in your preSubmit event make sure to check if(action !== 'remove')
if you don't, your delete action will validate your form and return false because nothing is in the form on first load.
This also explains why it works after an update, it's because the values from the update are still in your form and it passes your preSubmit event validations.
At least that was what was happening to me when I was having the exact same issue you were.
Shay