canvas-datagrid 0.4.1 → 0.4.2

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/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ All notable changes to this project will be documented in this file.
7
7
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
8
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
9
 
10
+ ## 0.4.2 - 2022-01-22
11
+
12
+ ## Fixed
13
+
14
+ - Cancel moving when cursor exits grid (xianzhi3 #476)
15
+ - Fix clearing cells when grid is filtered (mdebrauw, #478)
16
+
10
17
  ## 0.4.1 - 2022-01-19
11
18
 
12
19
  ## Fixed
@@ -5432,6 +5432,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
5432
5432
  self.mousemove = function (e, overridePos) {
5433
5433
  if (self.contextMenu || self.input) {
5434
5434
  return;
5435
+ } // Cancel dragging action if user ventures outside grid
5436
+
5437
+
5438
+ if (self.draggingItem && e.which === 0) {
5439
+ self.stopFreezeMove(e);
5440
+ self.mouseup(e);
5441
+ return;
5435
5442
  }
5436
5443
 
5437
5444
  self.mouse = overridePos || self.getLayerPos(e);
@@ -7462,7 +7469,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
7462
7469
  if (columnIndex < 0) continue;
7463
7470
  var boundColumnIndex = self.getBoundColumnIndexFromViewColumnIndex(columnIndex);
7464
7471
  var columnName = schema[boundColumnIndex].name;
7465
- self.viewData[boundRowIndex][columnName] = '';
7472
+ self.originalData[boundRowIndex][columnName] = '';
7466
7473
  affectedCells.push([rowIndex, columnIndex, boundRowIndex, boundColumnIndex]);
7467
7474
  }
7468
7475
  } catch (err) {