-
Notifications
You must be signed in to change notification settings - Fork 199
Closed
Description
Hey, I just found that there's an issue for the util. The scenario is that I have multiple trees like this:
[
{
"label": "A",
"value": "1",
"key": "1",
"parentId": null,
"isLeaf": false,
"children": [
{
"label": "A1",
"value": "2",
"key": "2",
"parentId": "1",
"isLeaf": true
},
{
"label": "A2",
"value": "3",
"key": "3",
"parentId": "1",
"isLeaf": true
}
]
},
{
"label": "B",
"value": "4",
"key": "4",
"parentId": null,
"isLeaf": false,
"children": [
{
"label": "BB",
"value": "5",
"key": "5",
"parentId": "4",
"isLeaf": true
}
]
},
{
"label": "C",
"value": "8",
"key": "8",
"parentId": null,
"isLeaf": false,
"children": [
{
"label": "CC",
"value": "9",
"key": "9",
"parentId": "8",
"isLeaf": true
}
]
}
]
In filterAllCheckedData
function, when I select all the root nodes (A B C
), and then select some of their children nodes, this checking will push an object with some undefined properties to checkedNodesPositions
.
if (siblingChecked === len) {
parent.__checked = true;
checkedNodesPositions.push({ node: parent, pos: parent._pos });
Later, it will throw errors on trying to split on the undefined property within flatToHierarchy
function.
Metadata
Metadata
Assignees
Labels
No labels