diff --git a/src/bootstrap-table.js b/src/bootstrap-table.js
index <HASH>..<HASH> 100644
--- a/src/bootstrap-table.js
+++ b/src/bootstrap-table.js
@@ -1871,8 +1871,8 @@
             // remove and update
             if ($tr.next().is('tr.detail-view')) {
                 $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailOpen));
-                $tr.next().remove();
                 that.trigger('collapse-row', index, row);
+                $tr.next().remove();
             } else {
                 $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailClose));
                 $tr.after(sprintf('<tr class="detail-view"><td colspan="%s"></td></tr>', $tr.find('td').length));
Update bootstrap-table.js (#<I>)

Trigger collapse-row before removing content