backend-plus 1.18.11 → 1.18.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.
@@ -615,6 +615,7 @@ myOwn.tableGrid = function tableGrid(tableName, mainElement, opts){
615
615
  })
616
616
  };
617
617
  var tick = Math.random();
618
+ var thereIsANewRecord = grid.depots.filter(depot => depot.status == 'new').length;
618
619
  rows.forEach(function(row){
619
620
  if (my.skipTimeStamp(row, timeStamp)) return;
620
621
  var primaryKeyValuesForRow = getPrimaryKeyValues(primaryKey, row);
@@ -631,7 +632,7 @@ myOwn.tableGrid = function tableGrid(tableName, mainElement, opts){
631
632
  }
632
633
  }
633
634
  depot.tick = tick
634
- } else if (!depot) {
635
+ } else if (!depot && !thereIsANewRecord) {
635
636
  var depot = grid.createDepotFromRow(row);
636
637
  grid.depots.push(depot);
637
638
  grid.sortDepotsToDisplay(grid.depots);
@@ -644,13 +645,15 @@ myOwn.tableGrid = function tableGrid(tableName, mainElement, opts){
644
645
  },3000);
645
646
  }
646
647
  })
647
- var i = 0;
648
- while (i < grid.depots.length) {
649
- var depot = grid.depots[i];
650
- if (depot.tick != tick) {
651
- depot.manager.displayAsDeleted(depot);
652
- } else {
653
- i++;
648
+ if(!thereIsANewRecord){
649
+ var i = 0;
650
+ while (i < grid.depots.length) {
651
+ var depot = grid.depots[i];
652
+ if (depot.tick != tick) {
653
+ depot.manager.displayAsDeleted(depot);
654
+ } else {
655
+ i++;
656
+ }
654
657
  }
655
658
  }
656
659
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-plus",
3
3
  "description": "Backend for typed controls",
4
- "version": "1.18.11",
4
+ "version": "1.18.12",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",