浏览代码

Merge pull request #7571 from wenzhixin/fix/7554

Fixed the id is not working bug in rowAttributes
文翼 1 年之前
父节点
当前提交
1d7f2648d4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

@@ -1532,7 +1532,6 @@ class BootstrapTable {
       }
     }
     const tr = Utils.h('tr', {
-      ...attributes,
       id: Array.isArray(item) ? undefined : item._id,
       class: style && style.classes || (Array.isArray(item) ? undefined : item._class),
       style: style && style.css || (Array.isArray(item) ? undefined : item._style),
@@ -1540,6 +1539,7 @@ class BootstrapTable {
       'data-uniqueid': Utils.getItemField(item, this.options.uniqueId, false),
       'data-has-detail-view': this.options.detailView &&
         Utils.calculateObjectValue(null, this.options.detailFilter, [i, item]) ? 'true' : undefined,
+      ...attributes,
       ...data_
     })
     const trChildren = []