@syncfusion/ej2-gantt 19.4.53 → 19.4.56

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.
@@ -479,7 +479,8 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
479
479
  DateProcessor.prototype.calculateDuration = function (ganttData) {
480
480
  var ganttProperties = ganttData.ganttProperties;
481
481
  var tDuration;
482
- if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0) {
482
+ if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0 &&
483
+ !isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
483
484
  tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
484
485
  }
485
486
  else {
@@ -4322,7 +4323,19 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4322
4323
  //empty row height
4323
4324
  var emptydivHeight = 36;
4324
4325
  var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
4325
- this.chartBodyContent.style.height = formatUnit(emptyHeight);
4326
+ var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
4327
+ if (emptyHeight >= contentElement['offsetHeight']) {
4328
+ this.chartBodyContent.style.height = formatUnit(emptyHeight);
4329
+ }
4330
+ else {
4331
+ var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
4332
+ if (contentElement['offsetHeight'] >= scrollHeight) {
4333
+ this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
4334
+ }
4335
+ else {
4336
+ this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
4337
+ }
4338
+ }
4326
4339
  //let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
4327
4340
  this.chartBodyContent.style.width = formatUnit(this.parent.timelineModule.totalTimelineWidth);
4328
4341
  this.setVirtualHeight();
@@ -4355,7 +4368,21 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4355
4368
  if (this.chartBodyContent.clientHeight < this.chartBodyContainer.clientHeight) {
4356
4369
  if (lastRow) {
4357
4370
  addClass(lastRow.querySelectorAll('td'), 'e-lastrow');
4358
- this.chartBodyContent.style.height = formatUnit(this.parent.contentHeight + 1);
4371
+ var emptydivHeight = 36;
4372
+ var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
4373
+ var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
4374
+ if (emptyHeight >= contentElement['offsetHeight']) {
4375
+ this.chartBodyContent.style.height = formatUnit(emptyHeight);
4376
+ }
4377
+ else {
4378
+ var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
4379
+ if (contentElement['offsetHeight'] >= scrollHeight) {
4380
+ this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
4381
+ }
4382
+ else {
4383
+ this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
4384
+ }
4385
+ }
4359
4386
  }
4360
4387
  }
4361
4388
  }
@@ -5432,6 +5459,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
5432
5459
  }
5433
5460
  }
5434
5461
  }
5462
+ currentLevel = this.parent.zoomingLevels.findIndex(function (tempLevel) {
5463
+ return tempLevel.level === currentLevel;
5464
+ });
5435
5465
  var newTimeline = this.parent.zoomingLevels[currentLevel];
5436
5466
  var args = {
5437
5467
  requestType: isZoomIn ? 'beforeZoomIn' : 'beforeZoomOut',
@@ -8333,7 +8363,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8333
8363
  var childTaskbarNode = null;
8334
8364
  var data = this.templateData;
8335
8365
  if (this.childTaskbarTemplateFunction) {
8336
- childTaskbarNode = this.childTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'TaskbarTemplate', this.getTemplateID('TaskbarTemplate'), false, undefined, rootElement[0]);
8366
+ childTaskbarNode = this.childTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'TaskbarTemplate', this.getTemplateID('TaskbarTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
8337
8367
  }
8338
8368
  else {
8339
8369
  var labelString = '';
@@ -8772,7 +8802,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8772
8802
  var milestoneNode = null;
8773
8803
  var data = this.templateData;
8774
8804
  if (this.milestoneTemplateFunction) {
8775
- milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0]);
8805
+ milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
8776
8806
  }
8777
8807
  else {
8778
8808
  var template = '<div class="' + traceMilestone + '" style="position:absolute;">' +
@@ -8843,7 +8873,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8843
8873
  leftLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('left'));
8844
8874
  var leftLabelTemplateNode = null;
8845
8875
  if (this.leftTaskLabelTemplateFunction) {
8846
- leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0]);
8876
+ leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0], this.parent.treeGrid['root']);
8847
8877
  }
8848
8878
  else {
8849
8879
  var field = this.parent.labelSettings.leftLabel;
@@ -8854,6 +8884,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8854
8884
  }
8855
8885
  }
8856
8886
  if (leftLabelTemplateNode && leftLabelTemplateNode.length > 0) {
8887
+ if (leftLabelTemplateNode[0]['data'] === 'null') {
8888
+ leftLabelTemplateNode[0]['data'] = '';
8889
+ }
8857
8890
  leftLabelNode[0].appendChild([].slice.call(leftLabelTemplateNode)[0]);
8858
8891
  }
8859
8892
  return leftLabelNode;
@@ -8883,7 +8916,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8883
8916
  rightLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('right'));
8884
8917
  var rightLabelTemplateNode = null;
8885
8918
  if (this.rightTaskLabelTemplateFunction) {
8886
- rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0]);
8919
+ rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0], this.parent.treeGrid['root']);
8887
8920
  }
8888
8921
  else {
8889
8922
  var field = this.parent.labelSettings.rightLabel;
@@ -8894,6 +8927,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8894
8927
  }
8895
8928
  }
8896
8929
  if (rightLabelTemplateNode && rightLabelTemplateNode.length > 0) {
8930
+ if (rightLabelTemplateNode[0]['data'] === 'null') {
8931
+ rightLabelTemplateNode[0]['data'] = '';
8932
+ }
8897
8933
  rightLabelNode[0].appendChild([].slice.call(rightLabelTemplateNode)[0]);
8898
8934
  }
8899
8935
  return rightLabelNode;
@@ -8948,7 +8984,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8948
8984
  var parentTaskbarNode = null;
8949
8985
  var data = this.templateData;
8950
8986
  if (this.parentTaskbarTemplateFunction) {
8951
- parentTaskbarNode = this.parentTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'ParentTaskbarTemplate', this.getTemplateID('ParentTaskbarTemplate'), false, undefined, rootElement[0]);
8987
+ parentTaskbarNode = this.parentTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'ParentTaskbarTemplate', this.getTemplateID('ParentTaskbarTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
8952
8988
  }
8953
8989
  else {
8954
8990
  var labelString = '';
@@ -9062,10 +9098,19 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9062
9098
  };
9063
9099
  ChartRows.prototype.isTemplate = function (template) {
9064
9100
  var result = false;
9101
+ for (var i = 0; i < this.parent.ganttColumns.length; i++) {
9102
+ if (template === this.parent.ganttColumns[i].field) {
9103
+ result = true;
9104
+ break;
9105
+ }
9106
+ }
9065
9107
  if (typeof template !== 'string' || template.indexOf('#') === 0 || template.indexOf('<') > -1
9066
- || template.indexOf('$') > -1) {
9108
+ || template.indexOf('$') > -1 || !result) {
9067
9109
  result = true;
9068
9110
  }
9111
+ else {
9112
+ result = false;
9113
+ }
9069
9114
  return result;
9070
9115
  };
9071
9116
  /**
@@ -9080,7 +9125,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9080
9125
  ChartRows.prototype.leftLabelContainer = function () {
9081
9126
  var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
9082
9127
  leftLabelContainer) + ' ' + '" tabindex="-1" style="height:' +
9083
- (this.parent.rowHeight - 1) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
9128
+ (this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
9084
9129
  return this.createDivElement(template);
9085
9130
  };
9086
9131
  ChartRows.prototype.taskbarContainer = function () {
@@ -9103,7 +9148,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9103
9148
  ChartRows.prototype.rightLabelContainer = function () {
9104
9149
  var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
9105
9150
  rightLabelContainer) + '" ' + ' tabindex="-1" style="left:' + this.getRightLabelLeft(this.templateData) + 'px;height:'
9106
- + (this.parent.rowHeight - 1) + 'px;"></div>';
9151
+ + (this.parent.rowHeight - 2) + 'px;"></div>';
9107
9152
  return this.createDivElement(template);
9108
9153
  };
9109
9154
  ChartRows.prototype.childTaskbarLeftResizer = function () {
@@ -12726,25 +12771,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12726
12771
  * @returns {void} .
12727
12772
  */
12728
12773
  Gantt.prototype.calculateDimensions = function () {
12729
- var settingsHeight;
12730
- if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
12731
- !this.element.parentElement.style.height || this.element.parentElement.style.height.indexOf('%') !== -1)) {
12732
- var ganttHeight = void 0;
12733
- if (this.element.parentElement.style.height.indexOf('%') == -1) {
12734
- ganttHeight = Number(this.height.split("%")[0]);
12735
- }
12736
- else {
12737
- ganttHeight = Number(this.element.parentElement.style.height.split("%")[0]);
12738
- }
12739
- ganttHeight = (ganttHeight * window.innerHeight) / 100;
12740
- if (this.height === '100%') {
12741
- ganttHeight = ganttHeight - 16;
12742
- }
12743
- settingsHeight = this.validateDimentionValue(ganttHeight);
12744
- }
12745
- else {
12746
- settingsHeight = this.validateDimentionValue(this.height);
12747
- }
12774
+ var settingsHeight = this.validateDimentionValue(this.height);
12748
12775
  var settingsWidth = this.validateDimentionValue(this.width);
12749
12776
  if (!isNullOrUndefined(this.width) && typeof (this.width) === 'string' && this.width.indexOf('%') !== -1) {
12750
12777
  settingsWidth = this.width;
@@ -12887,40 +12914,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12887
12914
  */
12888
12915
  Gantt.prototype.windowResize = function () {
12889
12916
  if (!isNullOrUndefined(this.element)) {
12890
- var settingsHeight = void 0;
12891
- if (this.height.indexOf('%') !== -1) {
12892
- var ganttHeight = Number(this.height.split("%")[0]);
12893
- if (this.element.parentElement && (this.element.parentElement.style.height)) {
12894
- var containerHeight = void 0;
12895
- if (this.element.parentElement.style.height.indexOf('%') == -1) {
12896
- containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
12897
- ganttHeight = (ganttHeight * containerHeight) / 100;
12898
- }
12899
- else {
12900
- containerHeight = Number(this.element.parentElement.style.height.split("%")[0]);
12901
- ganttHeight = (window.innerHeight * containerHeight) / 100;
12902
- }
12903
- }
12904
- else {
12905
- ganttHeight = Number(this.height.split("%")[0]);
12906
- ganttHeight = (ganttHeight * window.innerHeight) / 100;
12907
- }
12908
- if (this.height === '100%') {
12909
- ganttHeight = ganttHeight - 16;
12910
- }
12911
- var toolbarHeight = 0;
12912
- if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
12913
- toolbarHeight = this.toolbarModule.element.offsetHeight;
12914
- }
12915
- var contentHeight = ganttHeight - this.ganttChartModule.chartTimelineContainer.offsetHeight - toolbarHeight;
12916
- settingsHeight = this.validateDimentionValue(ganttHeight);
12917
- this.element.style.height = settingsHeight;
12918
- this.element.querySelectorAll('.e-content')[0]['style'].height = contentHeight + 'px';
12919
- this.element.querySelectorAll('.e-content')[2]['style'].height = contentHeight + 'px';
12920
- }
12921
- else {
12922
- settingsHeight = this.validateDimentionValue(this.height);
12923
- }
12924
12917
  this.updateContentHeight();
12925
12918
  this.ganttChartModule.updateWidthAndHeight(); // Updating chart scroll conatiner height for row mismatch
12926
12919
  this.treeGridModule.ensureScrollBar();
@@ -13266,6 +13259,18 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13266
13259
  * @private
13267
13260
  */
13268
13261
  Gantt.prototype.treeDataBound = function (args) {
13262
+ this.element.getElementsByClassName('e-chart-root-container')[0]['style'].height = '100%';
13263
+ var gridHeight = this.element.getElementsByClassName('e-gridcontent')[0]['style'].height;
13264
+ var timelineContainer = this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'];
13265
+ gridHeight = 'calc(100% - ' + timelineContainer + 'px)';
13266
+ // eslint-disable-next-line
13267
+ this.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
13268
+ if (!isNullOrUndefined(this.toolbarModule)) {
13269
+ this.splitterElement.style.height = 'calc(100% - ' + this.toolbarModule.element.offsetHeight + 'px)';
13270
+ }
13271
+ else {
13272
+ this.splitterElement.style.height = '100%';
13273
+ }
13269
13274
  if (this.isLoad) {
13270
13275
  this.updateCurrentViewData();
13271
13276
  if (!this.enableVirtualization) {
@@ -13285,8 +13290,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13285
13290
  removeClass(this.treeGrid.element.querySelectorAll('.e-headercell'), timelineSingleHeaderOuterDiv);
13286
13291
  removeClass(this.treeGrid.element.querySelectorAll('.e-columnheader'), timelineSingleHeaderOuterDiv);
13287
13292
  }
13288
- this.treeGrid.height = this.ganttHeight - toolbarHeight -
13289
- this.treeGrid.grid.getHeaderContent().offsetHeight;
13293
+ this.treeGrid.height = '100%';
13290
13294
  this.notify('tree-grid-created', {});
13291
13295
  this.createGanttPopUpElement();
13292
13296
  this.hideSpinner();
@@ -16057,7 +16061,8 @@ var CellEdit = /** @__PURE__ @class */ (function () {
16057
16061
  if (!ganttRecord.ganttProperties.isAutoSchedule) {
16058
16062
  this.parent.setRecordValue('autoWidth', this.parent.dataOperation.calculateWidth(ganttRecord, false), ganttRecord.ganttProperties, true);
16059
16063
  }
16060
- if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0) {
16064
+ if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0 &&
16065
+ !isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
16061
16066
  this.parent.editModule.taskbarEditModule.updateSegmentProgress(args.data.ganttProperties);
16062
16067
  }
16063
16068
  if (!args.data.hasChildRecords) {
@@ -23684,23 +23689,22 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23684
23689
  }
23685
23690
  /* data Source update */
23686
23691
  if (!isNullOrUndefined(parentItem)) {
23687
- childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem);
23688
- /*Child collection update*/
23692
+ if (rowPosition == 'Above') {
23693
+ childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem);
23694
+ }
23695
+ else if (rowPosition == 'Below') {
23696
+ childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem) + 1;
23697
+ }
23698
+ else {
23699
+ childIndex = parentItem.childRecords.length;
23700
+ } /*Child collection update*/
23689
23701
  parentItem.childRecords.splice(childIndex, 0, record);
23690
23702
  if ((this.parent.dataSource instanceof DataManager &&
23691
23703
  isNullOrUndefined(parentItem.taskData[this.parent.taskFields.parentID])) ||
23692
23704
  !isNullOrUndefined(this.parent.dataSource)) {
23693
23705
  var child = this.parent.taskFields.child;
23694
23706
  if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
23695
- if (rowPosition === 'Above') {
23696
- parentItem.taskData[child].splice(childIndex, 0, record.taskData);
23697
- }
23698
- else if (rowPosition === 'Below') {
23699
- parentItem.taskData[child].splice(childIndex + 1, 0, record.taskData);
23700
- }
23701
- else {
23702
- parentItem.taskData[child].push(record.taskData);
23703
- }
23707
+ parentItem.taskData[child].splice(childIndex, 0, record.taskData);
23704
23708
  }
23705
23709
  else {
23706
23710
  parentItem.taskData[child] = [];
@@ -23763,11 +23767,27 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23763
23767
  }
23764
23768
  };
23765
23769
  Edit$$1.prototype.refreshRecordInImmutableMode = function () {
23770
+ var _loop_1 = function (i) {
23771
+ var originalData = this_1.parent.modifiedRecords[i];
23772
+ var treeIndex = this_1.parent.allowRowDragAndDrop ? 1 : 0;
23773
+ var uniqueTaskID = this_1.parent.taskFields.id;
23774
+ originalIndex = this_1.parent.currentViewData.findIndex(function (data) {
23775
+ return (data[uniqueTaskID] == originalData[uniqueTaskID]);
23776
+ });
23777
+ if (this_1.parent.treeGrid.getRows()[originalIndex]) {
23778
+ this_1.parent.treeGrid.renderModule.cellRender({
23779
+ data: originalData, cell: this_1.parent.treeGrid.getRows()[originalIndex].cells[this_1.parent.treeColumnIndex + treeIndex],
23780
+ column: this_1.parent.treeGrid.grid.getColumns()[this_1.parent.treeColumnIndex],
23781
+ requestType: 'rowDragAndDrop'
23782
+ });
23783
+ this_1.parent.treeGrid.renderModule.RowModifier({
23784
+ data: originalData, row: this_1.parent.treeGrid.getRows()[originalIndex], rowHeight: this_1.parent.rowHeight
23785
+ });
23786
+ }
23787
+ };
23788
+ var this_1 = this, originalIndex;
23766
23789
  for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
23767
- var originalData = this.parent.modifiedRecords[i];
23768
- var dataId = this.parent.viewType === 'ProjectView' ?
23769
- originalData.ganttProperties.taskId : originalData.ganttProperties.rowUniqueID;
23770
- this.parent.treeGrid.grid.setRowData(dataId, originalData);
23790
+ _loop_1(i);
23771
23791
  }
23772
23792
  };
23773
23793
  /**
@@ -24521,15 +24541,18 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24521
24541
  if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
24522
24542
  draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
24523
24543
  draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
24544
+ draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.parentID];
24524
24545
  }
24525
24546
  else {
24526
24547
  draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
24527
24548
  draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
24549
+ draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.id];
24528
24550
  }
24529
24551
  }
24530
24552
  else {
24531
24553
  draggedRec[this.parent.taskFields.parentID] = null;
24532
24554
  draggedRec.taskData[this.parent.taskFields.parentID] = null;
24555
+ draggedRec.ganttProperties['parentId'] = null;
24533
24556
  }
24534
24557
  }
24535
24558
  };
@@ -25392,6 +25415,9 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
25392
25415
  this.addRemoveClass(index);
25393
25416
  this.selectedRowIndexes = extend([], this.getSelectedRowIndexes(), [], true);
25394
25417
  this.parent.setProperties({ selectedRowIndex: -1 }, true);
25418
+ if (this.selectedRowIndexes.length === 1) {
25419
+ this.parent.setProperties({ selectedRowIndex: this.selectedRowIndexes[0] }, true);
25420
+ }
25395
25421
  if (!isNullOrUndefined(this.parent.toolbarModule)) {
25396
25422
  this.parent.toolbarModule.refreshToolbarItems();
25397
25423
  }
@@ -27651,7 +27677,13 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
27651
27677
  }
27652
27678
  else {
27653
27679
  startIndex = droppedRecord.index;
27654
- endIndex = draggedRecord.index;
27680
+ var rootChildRecord = draggedRecord;
27681
+ if (rootChildRecord.childRecords.length > 0) {
27682
+ do {
27683
+ rootChildRecord = rootChildRecord.childRecords[rootChildRecord.childRecords.length - 1];
27684
+ } while (rootChildRecord.childRecords.length > 0);
27685
+ }
27686
+ endIndex = rootChildRecord.index;
27655
27687
  }
27656
27688
  var _loop_2 = function (i_1) {
27657
27689
  if (!isNullOrUndefined(data_1[i_1])) {