浏览代码

Merge pull request #6562 from wenzhixin/fix/6550

Fixed treegrid not working when id is text
文翼 3 年之前
父节点
当前提交
05cf6dc2da
共有 2 个文件被更改,包括 12 次插入4 次删除
  1. 10 0
      CHANGELOG.md
  2. 2 4
      src/extensions/treegrid/bootstrap-table-treegrid.js

+ 10 - 0
CHANGELOG.md

@@ -1,6 +1,16 @@
 ChangeLog
 ---------
 
+### 1.21.3
+
+- **Update:** Updated extend util instead of `$.extend`.
+- **Update:** - Fixed overwriting the `filterOptions` after rebuild.
+
+#### Extensions
+
+- **Update(export):** Fixed `exportTypes` option not working bug.
+- **Update(treegrid):** Fixed treegrid not working when id is text.
+
 ### 1.21.2
 
 #### Core

+ 2 - 4
src/extensions/treegrid/bootstrap-table-treegrid.js

@@ -77,11 +77,9 @@ $.BootstrapTable = class extends $.BootstrapTable {
 
   initRow (item, idx, data, parentDom) {
     if (this.treeEnable) {
-      const parentId = parseInt(item[this.options.parentIdField], 10)
-
       if (
-        this.options.rootParentId === parentId ||
-        !parentId
+        this.options.rootParentId === item[this.options.parentIdField] ||
+        !item[this.options.parentIdField]
       ) {
         if (item._level === undefined) {
           item._level = 0