@insticc/react-datagrid-2 1.1.19 → 1.1.20

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.
@@ -765,11 +765,12 @@ var DataGrid = function DataGrid(_ref) {
765
765
  onChange: function onChange() {
766
766
  var rowId = row.id.toString();
767
767
  setRowSelection(function (prev) {
768
- var newSelection = enableMultiRowSelection ? _objectSpread({}, prev) : {};
769
- if (prev[rowId] || enableMultiRowSelection) {
768
+ var newSelection = _objectSpread({}, prev);
769
+ if (newSelection[rowId]) {
770
770
  // If the row is already selected, deselect it
771
771
  delete newSelection[rowId];
772
772
  } else {
773
+ if (!enableMultiRowSelection) return _defineProperty({}, rowId, true);
773
774
  // If the row is not selected, select it
774
775
  newSelection[rowId] = true;
775
776
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insticc/react-datagrid-2",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "files": [