You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get the onReorderRow event to fire and so I have gone back to the Reorder Rows example to see what I am doing wrong.
When I run the example and move a row around the getData alert just shows the ids in the original order. I thought that the idea of this example was to reorder the ids?
Also would be possible to add an example of onReorderRows event to this example as I can't get that to do anything. It may be related to the above issue.
I had the same problem and after a few hours of searching I found the problem in the bootstrap-table.js code in the "initRow" method. Since version > 1.23.2 there have been changes that prevent rows reordering from working correctly.
I changed one line of code in "bootstrap-table/src/bootstrap-table.js:1536",
namely from
"id: Array.isArray(item) ? undefined : item._id,"
to
"id: attributes.id || (Array.isArray(item) ? undefined : item._id),
and rows reordering works again.
Bootstraptable version(s) affected
1.23.5
Description
I am trying to get the onReorderRow event to fire and so I have gone back to the Reorder Rows example to see what I am doing wrong.
When I run the example and move a row around the getData alert just shows the ids in the original order. I thought that the idea of this example was to reorder the ids?
Also would be possible to add an example of onReorderRows event to this example as I can't get that to do anything. It may be related to the above issue.
I have tried changing line 28 to this:
But it never gets called. I have three arguments here - the documentation states there are two arguments but lists three:
https://bootstrap-table.com/docs/extensions/reorder-rows/
Example(s)
https://live.bootstrap-table.com/example/extensions/reorder-rows.html is the original example
I copied that code to my own example: https://live.bootstrap-table.com/code/neilskilling-overskilling/18369 but this is just the same as the real example.
Possible Solutions
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: