wenzhixin / bootstrap-table

An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)
https://bootstrap-table.com/
MIT License
11.73k stars 4.44k forks source link

[group-by] indenter icon duplicated on destroy/reload of data #3318

Closed mlbaquerizo closed 6 years ago

mlbaquerizo commented 7 years ago

Using the group-by extension (not v2), upon destroying and reloading the table again, i.e.

$table.bootstrapTable('destroy').bootstrapTable({
    groupBy: "true",
    groupByField: ["group"]
}).bootstrapTable('load', data);

the <span class="indenter"> element is duplicated for each row each time. I think this is a bug.

See jsfiddle here. In this example the reload button above the table does the above code.

Work around would be to use removeAll instead of destroy and not reinitialize bootstrapTable. But what if I wanted/needed to use destroy?

wenzhixin commented 6 years ago

Fixed by https://github.com/wenzhixin/bootstrap-table/commit/8944bb3bb447963f2cdeae326ba16561e95e3673: http://jsfiddle.net/wenyi/nd5usdn4/4/