GigaTables / reactables

GigaTables is a ReactJS plug-in to help web-developers process table-data in applications and CMS, CRM, ERP or similar systems.
MIT License
143 stars 30 forks source link

the delete-editor doesn't close automatically #137

Closed xuanxiaodeyu closed 5 years ago

xuanxiaodeyu commented 5 years ago

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?

arthurkushman commented 5 years ago

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

{
    "rows": [
        1130,
        6257
    ]
}
xuanxiaodeyu commented 5 years ago

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.

arthurkushman commented 5 years ago

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 - https://github.com/GigaTables/reactables/commit/fce2f436b353a703bd17cb8fc4b842199fd1471d 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?

xuanxiaodeyu commented 5 years ago

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?

arthurkushman commented 5 years ago

https://www.npmjs.com/package/gigatables-react/v/2.8.11

xuanxiaodeyu commented 5 years ago

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.

arthurkushman commented 5 years ago

https://www.npmjs.com/package/gigatables-react/v/2.8.12 - should work properly this time.

xuanxiaodeyu commented 5 years ago

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

arthurkushman commented 5 years ago

U r welcome.