@syncfusion/ej2-treegrid
Advanced tools
Comparing version 18.2.57 to 18.2.58
@@ -9,2 +9,11 @@ # Changelog | ||
- `#292933` - checkbox rendered properly while using the template column. | ||
- `#290187` - Row drag and drop between treegrid works fine while using self reference data binding. | ||
## 18.2.57 (2020-09-08) | ||
### TreeGrid | ||
#### Bug Fixes | ||
- `#291330` - Expand or Collapse of the inner level parent records in custom binding works fine. | ||
@@ -11,0 +20,0 @@ - `#289600` - Updating the datasource dynamically with Virtualization after scrolling works fine. |
/*! | ||
* filename: index.d.ts | ||
* version : 18.2.57 | ||
* version : 18.2.58 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-treegrid@*", | ||
"_id": "@syncfusion/ej2-treegrid@18.2.56", | ||
"_id": "@syncfusion/ej2-treegrid@18.2.57", | ||
"_inBundle": false, | ||
"_integrity": "sha512-MOWFctkXMl3uN2NQUbwFLJ3EOAkx6pqd44gKLH+LHjglzaJ70b3gRxKf/XaFjYow22XZVpoQEW/iZbKj+DyrvA==", | ||
"_integrity": "sha512-T9aXnV76bucYfo+jF7FLbcPlCZbJR2py1jGYgiwRibGLWMuA1WPccurFMOM/ECVsPFJeYhvlkqEvwrkU7t+QqQ==", | ||
"_location": "/@syncfusion/ej2-treegrid", | ||
@@ -27,4 +27,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-treegrid/-/ej2-treegrid-18.2.56.tgz", | ||
"_shasum": "18ef3fb9694ce350d24d77503289f6cacbc42b6b", | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-treegrid/-/ej2-treegrid-18.2.57.tgz", | ||
"_shasum": "452a479a76065325bc9d2d1a069eb378d7959158", | ||
"_spec": "@syncfusion/ej2-treegrid@*", | ||
@@ -42,3 +42,3 @@ "_where": "/jenkins/workspace/automation_release_18.1.0.1-52JLNOGRCDHXRVQM3W564VPLFCPHWUYDYU3I3DVRABSR7F6AIFYQ/packages/included", | ||
"@syncfusion/ej2-data": "~18.2.54", | ||
"@syncfusion/ej2-grids": "~18.2.57", | ||
"@syncfusion/ej2-grids": "~18.2.58", | ||
"@syncfusion/ej2-popups": "~18.2.54" | ||
@@ -65,4 +65,4 @@ }, | ||
"typings": "index.d.ts", | ||
"version": "18.2.57", | ||
"version": "18.2.58", | ||
"sideEffects": false | ||
} |
import { TreeGrid } from '../base/treegrid'; | ||
import { ITreeData } from '../base'; | ||
/** | ||
@@ -15,3 +16,3 @@ * TreeGrid RowDragAndDrop module | ||
/** @hidden */ | ||
private treeGridData; | ||
treeGridData: ITreeData[]; | ||
/** @hidden */ | ||
@@ -18,0 +19,0 @@ private treeData; |
import { Grid, RowDD as GridDragDrop, parentsUntil } from '@syncfusion/ej2-grids'; | ||
import { getObject, Scroll } from '@syncfusion/ej2-grids'; | ||
import { closest, isNullOrUndefined, classList, setValue, extend } from '@syncfusion/ej2-base'; | ||
import { closest, isNullOrUndefined, classList, setValue, extend, getValue } from '@syncfusion/ej2-base'; | ||
import { DataManager } from '@syncfusion/ej2-data'; | ||
@@ -134,5 +134,23 @@ import * as events from '../base/constant'; | ||
var recordIndex1 = 0; | ||
if (!draggedRecord_1.taskData.hasOwnProperty(tObj.childMapping)) { | ||
if (!isNullOrUndefined(draggedRecord_1.taskData) && | ||
!draggedRecord_1.taskData.hasOwnProperty(tObj.childMapping)) { | ||
draggedRecord_1.taskData[tObj.childMapping] = []; | ||
} | ||
if (draggedRecord_1.hasOwnProperty(tObj.childMapping) && | ||
(draggedRecord_1[tObj.childMapping]).length && !this.isDraggedWithChild) { | ||
var childData = (draggedRecord_1[tObj.childMapping]); | ||
for (var j = 0; j < childData.length; j++) { | ||
if (dragRecords_1.indexOf(childData[j]) === -1) { | ||
dragRecords_1.splice(j, 0, childData[j]); | ||
childData[j].taskData = extend({}, childData[j]); | ||
i += 1; | ||
} | ||
} | ||
} | ||
if (draggedRecord_1.hasOwnProperty(tObj.parentIdMapping) && draggedRecord_1[tObj.parentIdMapping] != null | ||
&& !this.isDraggedWithChild) { | ||
draggedRecord_1.taskData[tObj.parentIdMapping] = null; | ||
delete draggedRecord_1.parentItem; | ||
delete draggedRecord_1.parentUniqueID; | ||
} | ||
if (isNullOrUndefined(tObj.dataSource)) { | ||
@@ -142,4 +160,4 @@ tObj.dataSource = []; | ||
tObj.dataSource.splice(recordIndex1, 0, draggedRecord_1.taskData); | ||
tObj.setProperties({ dataSource: tObj.dataSource }, false); | ||
} | ||
tObj.setProperties({ dataSource: tObj.dataSource }, false); | ||
} | ||
@@ -153,5 +171,7 @@ else { | ||
this.treeGridData = this.parent.dataSource.dataSource.json; | ||
this.treeData = this.parent.dataSource.dataSource.json; | ||
} | ||
else { | ||
this.treeGridData = this.parent.grid.dataSource; | ||
this.treeData = this.parent.dataSource; | ||
} | ||
@@ -551,2 +571,12 @@ this.dropRows(args); | ||
srcControl.notify(events.rowsAdd, { toIndex: targetIndex, records: records }); | ||
var srcControlFlatData = srcControl.rowDragAndDropModule.treeGridData; | ||
if (!isNullOrUndefined(srcControlFlatData)) { | ||
for (var i = 0; i < srcControlFlatData.length; i++) { | ||
srcControlFlatData[i].index = i; | ||
if (!isNullOrUndefined(srcControlFlatData[i].parentItem)) { | ||
var actualIndex = getValue('uniqueIDCollection.' + srcControlFlatData[i].parentUniqueID + '.index', srcControl); | ||
srcControlFlatData[i].parentItem.index = actualIndex; | ||
} | ||
} | ||
} | ||
tObj.refresh(); | ||
@@ -783,2 +813,3 @@ srcControl.refresh(); | ||
tObj.flatData.splice(count, 0, currentRecord); | ||
setValue('uniqueIDCollection.' + currentRecord.uniqueID, currentRecord, this.parent); | ||
if (tObj.parentIdMapping) { | ||
@@ -785,0 +816,0 @@ this.treeData.splice(count, 0, currentRecord.taskData); |
@@ -84,3 +84,3 @@ import { getObject, appendChildren } from '@syncfusion/ej2-grids'; | ||
var cellElement; | ||
var column = this.parent.getColumnByField(args.column.field); | ||
var column = this.parent.getColumnByUid(args.column.uid); | ||
var summaryRow = data.isSummaryRow; | ||
@@ -87,0 +87,0 @@ if (!isNullOrUndefined(data.parentItem)) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5384112
45347