px-jspreadsheet-ce 0.0.9 → 0.0.11

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.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.js",
7
7
  "types": "dist/index.d.ts",
8
- "version": "0.0.9",
8
+ "version": "0.0.11",
9
9
  "exports": {
10
10
  ".": {
11
11
  "import": "./src/index.js",
@@ -705,7 +705,9 @@ export const updateCell = function (x, y, value, force) {
705
705
  }
706
706
 
707
707
  // On change
708
- dispatch.call(obj, 'onchange', obj, obj.records[y] && obj.records[y][x] ? obj.records[y][x].element : null, x, y, value, record.oldValue);
708
+ if (!obj.createTableProcess) {
709
+ dispatch.call(obj, 'onchange', obj, obj.records[y] && obj.records[y][x] ? obj.records[y][x].element : null, x, y, value, record.oldValue);
710
+ }
709
711
  }
710
712
 
711
713
  return record;
@@ -493,6 +493,7 @@ export const buildWorksheet = async function () {
493
493
  }
494
494
 
495
495
  libraryBase.jspreadsheet.current = obj;
496
+ obj.createTableProcess = true;
496
497
  // prepareTable
497
498
  const promises = [];
498
499
 
@@ -560,9 +561,11 @@ export const buildWorksheet = async function () {
560
561
  } else {
561
562
  // Prepare table
562
563
  prepareTable.call(obj);
564
+ obj.createTableProcess = false;
563
565
  }
564
566
 
565
567
  await Promise.all(promises);
568
+ obj.createTableProcess = false;
566
569
 
567
570
  if (typeof spreadsheet.plugins === 'object') {
568
571
  Object.entries(spreadsheet.plugins).forEach(function ([, plugin]) {
@@ -680,8 +683,11 @@ export const updateWorksheet = function (options) {
680
683
  obj.options = options;
681
684
  obj.history = [];
682
685
  obj.historyIndex = -1;
686
+
683
687
  // Prepare table
688
+ obj.createTableProcess = true;
684
689
  prepareTable.call(obj);
690
+ obj.createTableProcess = false;
685
691
  };
686
692
 
687
693
  const worksheetPublicMethods = [