bootstrap-table icon indicating copy to clipboard operation
bootstrap-table copied to clipboard

Bootstrap-table-editable success callback not working as expected

Open OzzieIsaacs opened this issue 3 years ago • 0 comments

Bootstraptable version(s) affected: Tested with bootstrap-table version 1.8.12 using the bootstrap-table-editable plugin (version 1.5.1) I opened the issue here because I think I found the reason in bootstrap-table-editable.js file and I didn't find the file in the x-editable repository.

Description
After editing a table field I send the data via editable-url to my server (e.g. a comma separated lists), the server does some modification on the send data (purpose: strip spaces from beginning and end and removes duplicate entries in the list) and sends the changed data back to the client. I'm using the success callback option editable plugin is offering. The problem now is, after modifying the data according to the example given in the manual (http://vitalets.github.io/x-editable/docs.html#editable) the displayed value after hitting the submit button isn't changed.

Example
https://live.bootstrap-table.com/code/OzzieIsaacs/7583 The editor isn't working there? You need to provide a valid data-editable-url for reproducing it (I don't know where to get one from your test server)

Possible (optional)
I think the problem is here: https://github.com/wenzhixin/bootstrap-table/blob/97b79cf1868399fbb2ab0c8d9f4e4b04b63502e3/dist/extensions/editable/bootstrap-table-editable.js#L1819 The line should be: var submitValue = _ref2.newValue; (newValue is the Value returned from the server, and identical to submitValue if there is no success callback) I would have changed it by myself, but I didn't find this piece of code in the src tree

Additional context
I checked it with a python flask application running on Linux Mint 21. I used Firefox browser (current version) to reproduce the problem. To me it looks like a easy to reproduce bug.

I hope I did everything right

OzzieIsaacs avatar May 02 '21 19:05 OzzieIsaacs