bootstrap-table
bootstrap-table copied to clipboard
Static table, content of single cell different when exiting search
Description
We are using a static table.
When we change cell during search with a onclick event and clear out the search field, the cell is back to its original state instead of displaying the updated cell.
When we change a cell before using the search and then use the search, also the orginal cell is displayed. (Without the changes ) Is their a way to sync the search and nog search version of the table ?
Example(s)
Example editing before search:
Start status of the table:
Changing a cell with a onclick event:
Using the search:
Example editing during search:
Start status of the table:
Edit during search:
Removing search:
I don't know if it helps, but have you tried using the data-maintain-meta-data="true" ? Basically it is applied to the select option, maybe it also affects on the changed values.
You need to update the table's data after the onclick
event (which can be obtained through getData
), or you can directly use updateRow
or updateCell
to update the data in a row. This way, functions like search and sorting can work properly.