Skip to content

Commit 05cf6dc

Browse files
authored
Merge pull request #6562 from wenzhixin/fix/6550
Fixed treegrid not working when id is text
2 parents fe371dc + 5d80db6 commit 05cf6dc

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
ChangeLog
22
---------
33

4+
### 1.21.3
5+
6+
- **Update:** Updated extend util instead of `$.extend`.
7+
- **Update:** - Fixed overwriting the `filterOptions` after rebuild.
8+
9+
#### Extensions
10+
11+
- **Update(export):** Fixed `exportTypes` option not working bug.
12+
- **Update(treegrid):** Fixed treegrid not working when id is text.
13+
414
### 1.21.2
515

616
#### Core

src/extensions/treegrid/bootstrap-table-treegrid.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,9 @@ $.BootstrapTable = class extends $.BootstrapTable {
7777

7878
initRow (item, idx, data, parentDom) {
7979
if (this.treeEnable) {
80-
const parentId = parseInt(item[this.options.parentIdField], 10)
81-
8280
if (
83-
this.options.rootParentId === parentId ||
84-
!parentId
81+
this.options.rootParentId === item[this.options.parentIdField] ||
82+
!item[this.options.parentIdField]
8583
) {
8684
if (item._level === undefined) {
8785
item._level = 0

0 commit comments

Comments
 (0)