-
Notifications
You must be signed in to change notification settings - Fork 197
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
Delete modal doesn't show any data #195
Comments
Yes, this is a recent PR from @gogoafuzzz. Deletion of many rows is supported, so the modal dialog does not display their content. What you mean with "not working"? what happens when you click Delete button? btw, I will delete the minified file, it's outdated. |
Nothing happens when i clicked the button there was an error on console:
|
I had to switch back to commit ffd3005 to avoid this error ( |
I am getting the same issue when using ajax, is this the same scenario you are experiencing this with or are there other scenarios this is happening too also? |
@paulmcgann yes, same scenario with ajax Probably related to #190 |
Yep, ran into the same issue, as @paulmcgann mentioned, if I switch to commit ffd3005 version of dataTables.altEditor.free.js the delete modal now shows data in the box and actually has rowdata object with data in it instead of being undefined. I was getting an ajax error that it couldn't process the data object, and that's because rowdata was empty. So the new multiple row select does not seem to work if you are only selecting one row. (And I can't seem to select multiple rows either, just one row at a time. Clicking a second row just de-selects the previous). |
Hi, You need set
Example: const table = $(`#table`).DataTable({
select: "multiple",
altEditor: true,
onDeleteRow: function(alteditor, selectedRows, success, error) {
console.log(selectedRows.data())
}
}) Sorry, My English is not well. |
Ah, thank you! Of course that makes perfect sense now. 💯 If I may suggest, maybe the code can be changed to still fill rowdata with the one selected row so that onDeleteRow will still work and not error out due to empty rowdata in this case. I should have revisited the documentation, my mistake. :) It's been a while since I worked with AltEditor. It's great! |
Hi, the name must be "delete", can refer to example1 - L88 |
@SinisterSpatula Thanks for your suggestion, I create a pull request to fix it. |
My console keeps saying selectedRows.data is not a function |
I just reported an issue about modal titles about non-minified JS file.
When you use minified js file, there is no modal title problem (these files are not same!)
But in Delete Modal, there is no data in modal body and not working when you click delete button.
In modal body there is only this text:
The text was updated successfully, but these errors were encountered: