GigaTables/reactables

the delete-editor doesn't close automatically

xuanxiaodeyu opened this issue · 9 comments

I click the delete-button to delete one row, and then the confim-box is shown. After I click the 'Yes' button, the box isn't closed although the row could be deleted successfully.
I think it's because I didn't set the right response. The response that I set is {"delCount":1}. The console give an error:

Uncaught (in promise) ReferenceError: DataException is not defined
    at t.value (webpack-internal:///48:12)
    at r (webpack-internal:///48:12)
    at eval (webpack-internal:///48:12)
    at t.value (webpack-internal:///48:12)
    at eval (webpack-internal:///48:12)

Can you help me to fix this?

Hi there, you should return an object with rows key which contains list of ids.

{
    "rows": [
        1130,
        6257
    ]
}

Sorry, I tried to set the response as what you said, but the bug still exists. My gigatable's version is 2.8.0, (my code don't support the version 2.9.0), are the both verison's response same? If my response is right, I don't know what result in this bug.

I've tested on 2.9.0, but on standard theme (there are some issues in material-ui theme).
It seems like the bug with delete was fixed here - fce2f43
And this commit has been added to 2.9.0 release.
What do u mean by "my code don't support the version 2.9.0", u don't want to install material-ui plugin?

Yes, I don't want to install material-ui plugin. I use the version 2.8.0 and everything is ok just except the bug with delete. But if I change the version to 2.9.0, my table can't be displayed and there are many bugs. I don't need to use the version 2.9.0 and just want to fix the delete-bug.
And what you mean is that this is a bug in the version 2.8.0, not in my code, and you have fixed it in 2.9.0? And if I want to fix it, I must change the version to 2.9.0?

I tried this version. Now the delete-box can be closed automatically, but not like the create-box and edit-box, after the delete-box is closed, the table doesn't update automatically , the deleted row is still displayed, although the row is successfully deleted in the back-end.

Yes, this version works properly. Thank you so much!

U r welcome.