react-konva-grid
Advanced tools
Comparing version 2.8.0 to 2.8.1
@@ -167,2 +167,4 @@ "use strict"; | ||
} | ||
/* Is the current cell same as active cell */ | ||
const isSameAsActiveCell = isEqualCells(coords, activeCell); | ||
/* Command or Control key */ | ||
@@ -172,4 +174,8 @@ if (activeCell && allowMultiple) { | ||
* User is adding activeCell to selection | ||
* | ||
* 1. User is selecting and not de-selecting | ||
* 2. User has not made any selection | ||
* 3. Trying to add active cell to selection | ||
*/ | ||
if (isEqualCells(coords, activeCell) && !isDeselecting) { | ||
if (isSameAsActiveCell && (!isDeselecting || !hasSelections)) { | ||
return; | ||
@@ -176,0 +182,0 @@ } |
{ | ||
"name": "react-konva-grid", | ||
"description": "Declarative React Canvas Grid primitive for Data table, Pivot table, Excel Worksheets", | ||
"version": "2.8.0", | ||
"version": "2.8.1", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -289,2 +289,5 @@ import React, { useState, useCallback, useRef, useEffect } from "react"; | ||
/* Is the current cell same as active cell */ | ||
const isSameAsActiveCell = isEqualCells(coords, activeCell); | ||
/* Command or Control key */ | ||
@@ -294,6 +297,11 @@ if (activeCell && allowMultiple) { | ||
* User is adding activeCell to selection | ||
* | ||
* 1. User is selecting and not de-selecting | ||
* 2. User has not made any selection | ||
* 3. Trying to add active cell to selection | ||
*/ | ||
if (isEqualCells(coords, activeCell) && !isDeselecting) { | ||
if (isSameAsActiveCell && (!isDeselecting || !hasSelections)) { | ||
return; | ||
} | ||
/** | ||
@@ -300,0 +308,0 @@ * User is manually trying to select multiple selections, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16864371
25804