Check the source code and find that the operation is this.options.data When getselections, the query is this.data Is this a bug or does it need special treatment?
I think this is a bug since we use this.options.data to keep the original data safe and we use this.data to apply the corresponding filters/sorting etc.. So I think we need to kind of syncronize the addition, update and deletion of rows in these two arrays.
@wenzhixin @UtechtDustin what do you think? In the meantime marked as bug
Yes, its a bug.
Yes, its a bug.
Thank you for your reply.Mainly insert rows and delete rows
I think this is a bug since we use this.options.data to keep the original data safe and we use this.data to apply the corresponding filters/sorting etc.. So I think we need to kind of syncronize the addition, update and deletion of rows in these two arrays.
@wenzhixin @UtechtDustin what do you think? In the meantime marked as bug
Thank you for your reply.
@RichMoster could you provide us an example ?
I can't reproduce it with mine example.
I checked some rows, use the getSelections buttons and see the selected rows.
After that i clicked on the remove button which removes the rows, if i press the getSelections button again the array is empty.
I met the same scene.
https://live.bootstrap-table.com/example/welcome.html
When I checked Item ID 0, and then click 'delete' button, it works find. But now if I check Item ID 1, and then click 'delete' button, 'Item ID 1' will not be removed. It do nothing, since 'getSelections' store the 'Item ID 0' not 'Item ID 1'.
Please check it.
@RichMoster could you provide us an example ?
I can't reproduce it with mine example.
I checked some rows, use the getSelections buttons and see the selected rows.
After that i clicked on the remove button which removes the rows, if i press the getSelections button again the array is empty.
Sorry, I forgot to provide an example
example:https://live.bootstrap-table.com/code/RichMoster/4625
Step 1: Select data with ID 0 and 1
Step 2: Click the Delete button
Step 3: Click the getSelections button.The result is 0 and 1
Step 4: Select data with ID 2 and 3
Step 5: Click the getSelections button.The result is 0 and 1
Step 6: Click the Delete button.Unable to delete
I met the same scene.
https://live.bootstrap-table.com/example/welcome.html
When I checked Item ID 0, and then click 'delete' button, it works find. But now if I check Item ID 1, and then click 'delete' button, 'Item ID 1' will not be removed. It do nothing, since 'getSelections' store the 'Item ID 0' not 'Item ID 1'.
Please check it.
Yes, the same as my question
Thanks for the example, i could figure out that sidePagination="server" is the problem, which also explains why i cant reproduce the issue.
We will check that!
Minimal example: https://live.bootstrap-table.com/code/UtechtDustin/4645
Most helpful comment
I think this is a bug since we use this.options.data to keep the original data safe and we use this.data to apply the corresponding filters/sorting etc.. So I think we need to kind of syncronize the addition, update and deletion of rows in these two arrays.
@wenzhixin @UtechtDustin what do you think? In the meantime marked as bug