@syncfusion/ej2-navigations 28.2.11 → 28.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11360,8 +11360,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11360
11360
  var oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', dataUid_1, true));
11361
11361
  checkedCount = oldCheckedNodes.length;
11362
11362
  var parentNode = new DataManager(this.OldCheckedData).executeLocal(new Query().where('hasChildren', 'equal', true, true));
11363
- if (parentNode.length > 0
11364
- && (this.OldCheckedData.some(function (oldNode) { return oldNode.id === dataUid_1; }) && childNodeChecked_1)) {
11363
+ if (parentNode.length > 0 && childNodeChecked_1 && ((this.OldCheckedData.some(function (oldNode) { return oldNode.id === dataUid_1; })) ||
11364
+ this.parentNodeCheck.indexOf(dataUid_1) !== -1)) {
11365
11365
  checkedCount = parentNode.length;
11366
11366
  parentNodeChecked = true;
11367
11367
  }
@@ -11383,7 +11383,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11383
11383
  if (count === 0 && checkedCount === 0) {
11384
11384
  return;
11385
11385
  }
11386
- else if (count === checkedCount || ((parentNodeChecked && count > 0) && (oldChildCount.length === matchedChildNodes.length)
11386
+ else if (count === checkedCount || ((parentNodeChecked && count > 0) && ((oldChildCount.length === matchedChildNodes.length)
11387
+ || (oldChildCount.length !== matchedChildNodes.length))
11387
11388
  && (oldChildCount.length !== 0 && matchedChildNodes.length !== 0) && rootNodeChecked_1
11388
11389
  && (this.autoCheck && this.showCheckBox))) {
11389
11390
  this.changeState(checkBoxEle, 'check', null, true, true);
@@ -11409,25 +11410,31 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11409
11410
  var childKey = typeof this.fields.child === 'string' ? this.fields.child : null;
11410
11411
  var dataId = this.fields.id;
11411
11412
  var parentKey = this.fields.parentID;
11413
+ var matchesDataUid = function (childNode) {
11414
+ if (!isNullOrUndefined(childKey) && childKey in childNode && Array.isArray(childNode[childKey])) {
11415
+ var matchNode = childNode[dataId];
11416
+ if (!isNullOrUndefined(matchNode)) {
11417
+ return matchNode.toString() === dataUid;
11418
+ }
11419
+ }
11420
+ else {
11421
+ var childNodePid = childNode[parentKey];
11422
+ if (!isNullOrUndefined(childNodePid)) {
11423
+ return childNodePid.toString() === dataUid;
11424
+ }
11425
+ }
11426
+ return false;
11427
+ };
11412
11428
  return this.checkedNodes
11413
11429
  .map(function (checkedNodeId) {
11414
- return new DataManager(_this.DDTTreeData)
11415
- .executeLocal(new Query().where('id', 'equal', checkedNodeId, true))[0];
11430
+ return _this.getNodeObject(checkedNodeId);
11416
11431
  })
11417
11432
  .filter(function (childNode) {
11418
- if (childNode && typeof childNode === 'object' && (parentKey in childNode || childKey in childNode)) {
11419
- if (!isNullOrUndefined(childKey) && childKey in childNode && Array.isArray(childNode[childKey])) {
11420
- var matchNode = childNode[dataId];
11421
- if (!isNullOrUndefined(matchNode)) {
11422
- return matchNode.toString() === dataUid;
11423
- }
11424
- }
11425
- else {
11426
- var childNodePid = childNode[parentKey];
11427
- if (!isNullOrUndefined(childNodePid)) {
11428
- return childNodePid.toString() === dataUid;
11429
- }
11430
- }
11433
+ if (childNode && typeof childNode === 'object' && (childKey in childNode)) {
11434
+ return matchesDataUid(childNode);
11435
+ }
11436
+ else if (_this.dataType !== 2 && typeof childNode === 'object' && (parentKey in childNode || childKey in childNode)) {
11437
+ return matchesDataUid(childNode);
11431
11438
  }
11432
11439
  return false;
11433
11440
  });