vxe-table 4.5.1 → 4.5.3

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.
Files changed (41) hide show
  1. package/README.en.md +4 -4
  2. package/README.md +4 -4
  3. package/README.zh-TW.md +4 -4
  4. package/es/edit/src/hook.js +176 -136
  5. package/es/icon/style.css +1 -1
  6. package/es/style.css +1 -1
  7. package/es/style.min.css +1 -1
  8. package/es/tools/log.js +1 -1
  9. package/es/v-x-e-table/index.js +1 -1
  10. package/es/v-x-e-table/src/renderer.js +2 -2
  11. package/lib/edit/src/hook.js +207 -158
  12. package/lib/edit/src/hook.min.js +1 -1
  13. package/lib/icon/style/style.css +1 -1
  14. package/lib/icon/style/style.min.css +1 -1
  15. package/lib/index.umd.js +221 -174
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/style.css +1 -1
  18. package/lib/style.min.css +1 -1
  19. package/lib/tools/log.js +1 -1
  20. package/lib/tools/log.min.js +1 -1
  21. package/lib/v-x-e-table/index.js +1 -1
  22. package/lib/v-x-e-table/index.min.js +1 -1
  23. package/lib/v-x-e-table/src/renderer.js +2 -2
  24. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  25. package/package.json +2 -2
  26. package/packages/edit/src/hook.ts +170 -131
  27. package/packages/v-x-e-table/src/renderer.ts +2 -2
  28. package/types/edit.d.ts +9 -0
  29. package/types/modal.d.ts +1 -1
  30. /package/es/icon/style/{iconfont.1692232054714.ttf → iconfont.1692445281977.ttf} +0 -0
  31. /package/es/icon/style/{iconfont.1692232054714.woff → iconfont.1692445281977.woff} +0 -0
  32. /package/es/icon/style/{iconfont.1692232054714.woff2 → iconfont.1692445281977.woff2} +0 -0
  33. /package/es/{iconfont.1692232054714.ttf → iconfont.1692445281977.ttf} +0 -0
  34. /package/es/{iconfont.1692232054714.woff → iconfont.1692445281977.woff} +0 -0
  35. /package/es/{iconfont.1692232054714.woff2 → iconfont.1692445281977.woff2} +0 -0
  36. /package/lib/icon/style/{iconfont.1692232054714.ttf → iconfont.1692445281977.ttf} +0 -0
  37. /package/lib/icon/style/{iconfont.1692232054714.woff → iconfont.1692445281977.woff} +0 -0
  38. /package/lib/icon/style/{iconfont.1692232054714.woff2 → iconfont.1692445281977.woff2} +0 -0
  39. /package/lib/{iconfont.1692232054714.ttf → iconfont.1692445281977.ttf} +0 -0
  40. /package/lib/{iconfont.1692232054714.woff → iconfont.1692445281977.woff} +0 -0
  41. /package/lib/{iconfont.1692232054714.woff2 → iconfont.1692445281977.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2277,7 +2277,7 @@ const GlobalConfig = {
2277
2277
  ;// CONCATENATED MODULE: ./packages/tools/log.ts
2278
2278
 
2279
2279
  function getLog(message, params) {
2280
- return `[vxe-table v${"4.5.0"}] ${conf.i18n(message, params)}`;
2280
+ return `[vxe-table v${"4.5.2"}] ${conf.i18n(message, params)}`;
2281
2281
  }
2282
2282
  function outLog(type) {
2283
2283
  return function (message, params) {
@@ -3400,8 +3400,8 @@ function getComponentOns(renderOpts, params, modelFunc, changeFunc) {
3400
3400
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(events, (func, key) => {
3401
3401
  ons[getOnName(key)] = function (...args) {
3402
3402
  if (true) {
3403
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(key)) {
3404
- errLog('vxe.error.errFunc', [key]);
3403
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
3404
+ errLog('vxe.error.errFunc', [func]);
3405
3405
  }
3406
3406
  }
3407
3407
  func(params, ...args);
@@ -4271,7 +4271,7 @@ const config = new VXETableConfig();
4271
4271
  const v = 'v4';
4272
4272
  const VXETable = {
4273
4273
  v,
4274
- version: "4.5.0",
4274
+ version: "4.5.2",
4275
4275
  setup: setup,
4276
4276
  interceptor: interceptor,
4277
4277
  renderer: renderer,
@@ -5627,10 +5627,15 @@ const editHook = {
5627
5627
  const parentRest = fullAllDataRowIdData[getRowid($xetable, parentRow)];
5628
5628
  const parentLevel = parentRest ? parentRest.level : 0;
5629
5629
  let parentChilds = parentRow[childrenField];
5630
+ let mapChilds = parentRow[mapChildrenField];
5630
5631
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(parentChilds)) {
5631
5632
  parentChilds = parentRow[childrenField] = [];
5632
5633
  }
5634
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(mapChilds)) {
5635
+ mapChilds = parentRow[childrenField] = [];
5636
+ }
5633
5637
  parentChilds[funcName](item);
5638
+ mapChilds[funcName](item);
5634
5639
  const rest = {
5635
5640
  row: item,
5636
5641
  rowid,
@@ -5668,190 +5673,222 @@ const editHook = {
5668
5673
  }
5669
5674
  });
5670
5675
  }
5671
- editMethods = {
5672
- /**
5673
- * 往表格中插入临时数据
5674
- *
5675
- * @param {*} records
5676
- */
5677
- insert(records) {
5678
- return editMethods.insertAt(records, null);
5679
- },
5680
- /**
5681
- * 往表格指定行中插入临时数据
5682
- * 如果 row 为空则从插入到顶部,如果为树结构,则插入到目标节点顶部
5683
- * 如果 row 为 -1 则从插入到底部,如果为树结构,则插入到目标节点底部
5684
- * 如果 row 为有效行则插入到该行的位置,如果为树结构,则有插入到效的目标节点该行的位置
5685
- * @param {Object/Array} records 新的数据
5686
- * @param {Row} row 指定行
5687
- */
5688
- insertAt(records, row) {
5689
- const {
5690
- treeConfig
5691
- } = props;
5692
- const {
5693
- mergeList,
5694
- editStore
5695
- } = reactData;
5696
- const {
5697
- tableFullTreeData,
5698
- afterFullData,
5699
- tableFullData,
5700
- fullDataRowIdData,
5701
- fullAllDataRowIdData
5702
- } = internalData;
5703
- const treeOpts = computeTreeOpts.value;
5704
- const {
5705
- transform,
5706
- rowField,
5707
- mapChildrenField
5708
- } = treeOpts;
5709
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records)) {
5710
- records = [records];
5676
+ const handleInsertRowAt = (records, row, isInsertNextRow) => {
5677
+ const {
5678
+ treeConfig
5679
+ } = props;
5680
+ const {
5681
+ mergeList,
5682
+ editStore
5683
+ } = reactData;
5684
+ const {
5685
+ tableFullTreeData,
5686
+ afterFullData,
5687
+ tableFullData,
5688
+ fullDataRowIdData,
5689
+ fullAllDataRowIdData
5690
+ } = internalData;
5691
+ const treeOpts = computeTreeOpts.value;
5692
+ const {
5693
+ transform,
5694
+ rowField,
5695
+ mapChildrenField
5696
+ } = treeOpts;
5697
+ const childrenField = treeOpts.children || treeOpts.childrenField;
5698
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records)) {
5699
+ records = [records];
5700
+ }
5701
+ const newRecords = $xetable.defineField(records.map(record => Object.assign(treeConfig && transform ? {
5702
+ [mapChildrenField]: [],
5703
+ [childrenField]: []
5704
+ } : {}, record)));
5705
+ if (!row) {
5706
+ // 如果为虚拟树
5707
+ if (treeConfig && transform) {
5708
+ insertTreeRow(newRecords, false);
5709
+ } else {
5710
+ afterFullData.unshift(...newRecords);
5711
+ tableFullData.unshift(...newRecords);
5712
+ // 刷新单元格合并
5713
+ mergeList.forEach(mergeItem => {
5714
+ const {
5715
+ row: mergeRowIndex
5716
+ } = mergeItem;
5717
+ if (mergeRowIndex > 0) {
5718
+ mergeItem.row = mergeRowIndex + newRecords.length;
5719
+ }
5720
+ });
5711
5721
  }
5712
- const newRecords = $xetable.defineField(records.map(record => Object.assign({}, record)));
5713
- if (!row) {
5722
+ } else {
5723
+ if (row === -1) {
5714
5724
  // 如果为虚拟树
5715
5725
  if (treeConfig && transform) {
5716
- insertTreeRow(newRecords, false);
5726
+ insertTreeRow(newRecords, true);
5717
5727
  } else {
5718
- afterFullData.unshift(...newRecords);
5719
- tableFullData.unshift(...newRecords);
5728
+ afterFullData.push(...newRecords);
5729
+ tableFullData.push(...newRecords);
5720
5730
  // 刷新单元格合并
5721
5731
  mergeList.forEach(mergeItem => {
5722
5732
  const {
5723
- row: mergeRowIndex
5733
+ row: mergeRowIndex,
5734
+ rowspan: mergeRowspan
5724
5735
  } = mergeItem;
5725
- if (mergeRowIndex > 0) {
5726
- mergeItem.row = mergeRowIndex + newRecords.length;
5736
+ if (mergeRowIndex + mergeRowspan > afterFullData.length) {
5737
+ mergeItem.rowspan = mergeRowspan + newRecords.length;
5727
5738
  }
5728
5739
  });
5729
5740
  }
5730
5741
  } else {
5731
- if (row === -1) {
5732
- // 如果为虚拟树
5733
- if (treeConfig && transform) {
5734
- insertTreeRow(newRecords, true);
5735
- } else {
5736
- afterFullData.push(...newRecords);
5737
- tableFullData.push(...newRecords);
5738
- // 刷新单元格合并
5739
- mergeList.forEach(mergeItem => {
5740
- const {
5741
- row: mergeRowIndex,
5742
- rowspan: mergeRowspan
5743
- } = mergeItem;
5744
- if (mergeRowIndex + mergeRowspan > afterFullData.length) {
5745
- mergeItem.rowspan = mergeRowspan + newRecords.length;
5746
- }
5747
- });
5748
- }
5749
- } else {
5750
- // 如果为虚拟树
5751
- if (treeConfig && transform) {
5752
- const matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData, item => row[rowField] === item[rowField], {
5753
- children: mapChildrenField
5754
- });
5755
- if (matchObj) {
5756
- const {
5757
- parent: parentRow
5758
- } = matchObj;
5759
- const parentChilds = matchObj.items;
5760
- const parentRest = fullAllDataRowIdData[getRowid($xetable, parentRow)];
5761
- const parentLevel = parentRest ? parentRest.level : 0;
5762
- newRecords.forEach((item, i) => {
5763
- const rowid = getRowid($xetable, item);
5764
- if (true) {
5765
- if (item[treeOpts.parentField]) {
5766
- if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
5767
- errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
5768
- }
5742
+ // 如果为虚拟树
5743
+ if (treeConfig && transform) {
5744
+ const matchMapObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData, item => row[rowField] === item[rowField], {
5745
+ children: mapChildrenField
5746
+ });
5747
+ if (matchMapObj) {
5748
+ const {
5749
+ parent: parentRow
5750
+ } = matchMapObj;
5751
+ const parentMapChilds = parentRow ? parentRow[mapChildrenField] : tableFullTreeData;
5752
+ const parentRest = fullAllDataRowIdData[getRowid($xetable, parentRow)];
5753
+ const parentLevel = parentRest ? parentRest.level : 0;
5754
+ newRecords.forEach((item, i) => {
5755
+ const rowid = getRowid($xetable, item);
5756
+ if (true) {
5757
+ if (item[treeOpts.parentField]) {
5758
+ if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
5759
+ errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
5769
5760
  }
5770
5761
  }
5771
- if (parentRow) {
5772
- item[treeOpts.parentField] = parentRow[rowField];
5773
- }
5774
- parentChilds.splice(matchObj.index + i, 0, item);
5775
- const rest = {
5776
- row: item,
5777
- rowid,
5778
- seq: -1,
5779
- index: -1,
5780
- _index: -1,
5781
- $index: -1,
5782
- items: parentChilds,
5783
- parent: parentRow,
5784
- level: parentLevel + 1
5785
- };
5786
- fullDataRowIdData[rowid] = rest;
5787
- fullAllDataRowIdData[rowid] = rest;
5762
+ }
5763
+ if (parentRow) {
5764
+ item[treeOpts.parentField] = parentRow[rowField];
5765
+ }
5766
+ let targetIndex = matchMapObj.index + i;
5767
+ if (isInsertNextRow) {
5768
+ targetIndex = targetIndex + 1;
5769
+ }
5770
+ parentMapChilds.splice(targetIndex, 0, item);
5771
+ const rest = {
5772
+ row: item,
5773
+ rowid,
5774
+ seq: -1,
5775
+ index: -1,
5776
+ _index: -1,
5777
+ $index: -1,
5778
+ items: parentMapChilds,
5779
+ parent: parentRow,
5780
+ level: parentLevel + 1
5781
+ };
5782
+ fullDataRowIdData[rowid] = rest;
5783
+ fullAllDataRowIdData[rowid] = rest;
5784
+ });
5785
+ // 源
5786
+ if (parentRow) {
5787
+ const matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData, item => row[rowField] === item[rowField], {
5788
+ children: childrenField
5788
5789
  });
5789
- } else {
5790
- if (true) {
5791
- warnLog('vxe.error.unableInsert');
5790
+ if (matchObj) {
5791
+ const parentChilds = matchObj.items;
5792
+ let targetIndex = matchObj.index;
5793
+ if (isInsertNextRow) {
5794
+ targetIndex = targetIndex + 1;
5795
+ }
5796
+ parentChilds.splice(targetIndex, 0, ...newRecords);
5792
5797
  }
5793
- insertTreeRow(newRecords, true);
5794
5798
  }
5795
5799
  } else {
5796
- if (treeConfig) {
5797
- throw new Error(getLog('vxe.error.noTree', ['insert']));
5798
- }
5799
- let afIndex = -1;
5800
- // 如果是可视索引
5801
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(row)) {
5802
- if (row < afterFullData.length) {
5803
- afIndex = row;
5804
- }
5805
- } else {
5806
- afIndex = $xetable.findRowIndexOf(afterFullData, row);
5800
+ if (true) {
5801
+ warnLog('vxe.error.unableInsert');
5807
5802
  }
5808
- if (afIndex === -1) {
5809
- throw new Error(errLog('vxe.error.unableInsert'));
5803
+ insertTreeRow(newRecords, true);
5804
+ }
5805
+ } else {
5806
+ if (treeConfig) {
5807
+ throw new Error(getLog('vxe.error.noTree', ['insert']));
5808
+ }
5809
+ let afIndex = -1;
5810
+ // 如果是可视索引
5811
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(row)) {
5812
+ if (row < afterFullData.length) {
5813
+ afIndex = row;
5810
5814
  }
5811
- afterFullData.splice(afIndex, 0, ...newRecords);
5812
- tableFullData.splice($xetable.findRowIndexOf(tableFullData, row), 0, ...newRecords);
5813
- // 刷新单元格合并
5814
- mergeList.forEach(mergeItem => {
5815
- const {
5816
- row: mergeRowIndex,
5817
- rowspan: mergeRowspan
5818
- } = mergeItem;
5819
- if (mergeRowIndex > afIndex) {
5820
- mergeItem.row = mergeRowIndex + newRecords.length;
5821
- } else if (mergeRowIndex + mergeRowspan > afIndex) {
5822
- mergeItem.rowspan = mergeRowspan + newRecords.length;
5823
- }
5824
- });
5815
+ } else {
5816
+ afIndex = $xetable.findRowIndexOf(afterFullData, row);
5817
+ }
5818
+ // 如果是插入指定行的下一行
5819
+ if (isInsertNextRow) {
5820
+ afIndex = Math.max(afterFullData.length, afIndex + 1);
5821
+ }
5822
+ if (afIndex === -1) {
5823
+ throw new Error(errLog('vxe.error.unableInsert'));
5825
5824
  }
5825
+ afterFullData.splice(afIndex, 0, ...newRecords);
5826
+ tableFullData.splice($xetable.findRowIndexOf(tableFullData, row), 0, ...newRecords);
5827
+ // 刷新单元格合并
5828
+ mergeList.forEach(mergeItem => {
5829
+ const {
5830
+ row: mergeRowIndex,
5831
+ rowspan: mergeRowspan
5832
+ } = mergeItem;
5833
+ if (mergeRowIndex > afIndex) {
5834
+ mergeItem.row = mergeRowIndex + newRecords.length;
5835
+ } else if (mergeRowIndex + mergeRowspan > afIndex) {
5836
+ mergeItem.rowspan = mergeRowspan + newRecords.length;
5837
+ }
5838
+ });
5826
5839
  }
5827
5840
  }
5828
- const {
5829
- insertMaps
5830
- } = editStore;
5831
- newRecords.forEach(newRow => {
5832
- const rowid = getRowid($xetable, newRow);
5833
- insertMaps[rowid] = newRow;
5834
- });
5835
- $xetable.cacheRowMap();
5836
- $xetable.updateScrollYStatus();
5837
- $xetable.handleTableData(treeConfig && transform);
5838
- if (!(treeConfig && transform)) {
5839
- $xetable.updateAfterDataIndex();
5840
- }
5841
- $xetable.updateFooter();
5842
- $xetable.checkSelectionStatus();
5843
- if (reactData.scrollYLoad) {
5844
- $xetable.updateScrollYSpace();
5845
- }
5846
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
5847
- $xetable.updateCellAreas();
5848
- return $xetable.recalculate();
5849
- }).then(() => {
5850
- return {
5851
- row: newRecords.length ? newRecords[newRecords.length - 1] : null,
5852
- rows: newRecords
5853
- };
5854
- });
5841
+ }
5842
+ const {
5843
+ insertMaps
5844
+ } = editStore;
5845
+ newRecords.forEach(newRow => {
5846
+ const rowid = getRowid($xetable, newRow);
5847
+ insertMaps[rowid] = newRow;
5848
+ });
5849
+ $xetable.cacheRowMap();
5850
+ $xetable.updateScrollYStatus();
5851
+ $xetable.handleTableData(treeConfig && transform);
5852
+ if (!(treeConfig && transform)) {
5853
+ $xetable.updateAfterDataIndex();
5854
+ }
5855
+ $xetable.updateFooter();
5856
+ $xetable.checkSelectionStatus();
5857
+ if (reactData.scrollYLoad) {
5858
+ $xetable.updateScrollYSpace();
5859
+ }
5860
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
5861
+ $xetable.updateCellAreas();
5862
+ return $xetable.recalculate();
5863
+ }).then(() => {
5864
+ return {
5865
+ row: newRecords.length ? newRecords[newRecords.length - 1] : null,
5866
+ rows: newRecords
5867
+ };
5868
+ });
5869
+ };
5870
+ editMethods = {
5871
+ /**
5872
+ * 往表格中插入临时数据
5873
+ *
5874
+ * @param {*} records
5875
+ */
5876
+ insert(records) {
5877
+ return handleInsertRowAt(records, null);
5878
+ },
5879
+ /**
5880
+ * 往表格指定行中插入临时数据
5881
+ * 如果 row 为空则从插入到顶部,如果为树结构,则插入到目标节点顶部
5882
+ * 如果 row 为 -1 则从插入到底部,如果为树结构,则插入到目标节点底部
5883
+ * 如果 row 为有效行则插入到该行的位置,如果为树结构,则有插入到效的目标节点该行的位置
5884
+ * @param {Object/Array} records 新的数据
5885
+ * @param {Row} row 指定行
5886
+ */
5887
+ insertAt(records, row) {
5888
+ return handleInsertRowAt(records, row);
5889
+ },
5890
+ insertNextAt(records, row) {
5891
+ return handleInsertRowAt(records, row, true);
5855
5892
  },
5856
5893
  /**
5857
5894
  * 删除指定行数据
@@ -5876,8 +5913,10 @@ const editHook = {
5876
5913
  const checkboxOpts = computeCheckboxOpts.value;
5877
5914
  const treeOpts = computeTreeOpts.value;
5878
5915
  const {
5879
- transform
5916
+ transform,
5917
+ mapChildrenField
5880
5918
  } = treeOpts;
5919
+ const childrenField = treeOpts.children || treeOpts.childrenField;
5881
5920
  const {
5882
5921
  actived,
5883
5922
  removeMaps,
@@ -5886,7 +5925,7 @@ const editHook = {
5886
5925
  const {
5887
5926
  checkField
5888
5927
  } = checkboxOpts;
5889
- let rest = [];
5928
+ let delList = [];
5890
5929
  if (!rows) {
5891
5930
  rows = tableFullData;
5892
5931
  } else if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
@@ -5914,7 +5953,7 @@ const editHook = {
5914
5953
  }
5915
5954
  // 从数据源中移除
5916
5955
  if (tableFullData === rows) {
5917
- rows = rest = tableFullData.slice(0);
5956
+ rows = delList = tableFullData.slice(0);
5918
5957
  internalData.tableFullData = [];
5919
5958
  internalData.afterFullData = [];
5920
5959
  $xetable.clearMergeCells();
@@ -5923,10 +5962,18 @@ const editHook = {
5923
5962
  if (treeConfig && transform) {
5924
5963
  rows.forEach(row => {
5925
5964
  const rowid = getRowid($xetable, row);
5926
- const matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData, item => rowid === getRowid($xetable, item), treeOpts);
5965
+ const matchMapObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData, item => rowid === getRowid($xetable, item), {
5966
+ children: mapChildrenField
5967
+ });
5968
+ if (matchMapObj) {
5969
+ const rItems = matchMapObj.items.splice(matchMapObj.index, 1);
5970
+ delList.push(rItems[0]);
5971
+ }
5972
+ const matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData, item => rowid === getRowid($xetable, item), {
5973
+ children: childrenField
5974
+ });
5927
5975
  if (matchObj) {
5928
- const rItems = matchObj.items.splice(matchObj.index, 1);
5929
- rest.push(rItems[0]);
5976
+ matchObj.items.splice(matchObj.index, 1);
5930
5977
  }
5931
5978
  const afIndex = $xetable.findRowIndexOf(afterFullData, row);
5932
5979
  if (afIndex > -1) {
@@ -5938,7 +5985,7 @@ const editHook = {
5938
5985
  const tfIndex = $xetable.findRowIndexOf(tableFullData, row);
5939
5986
  if (tfIndex > -1) {
5940
5987
  const rItems = tableFullData.splice(tfIndex, 1);
5941
- rest.push(rItems[0]);
5988
+ delList.push(rItems[0]);
5942
5989
  }
5943
5990
  const afIndex = $xetable.findRowIndexOf(afterFullData, row);
5944
5991
  if (afIndex > -1) {
@@ -5985,8 +6032,8 @@ const editHook = {
5985
6032
  return $xetable.recalculate();
5986
6033
  }).then(() => {
5987
6034
  return {
5988
- row: rest.length ? rest[rest.length - 1] : null,
5989
- rows: rest
6035
+ row: delList.length ? delList[delList.length - 1] : null,
6036
+ rows: delList
5990
6037
  };
5991
6038
  });
5992
6039
  },