@rowsncolumns/grid
Advanced tools
Comparing version 6.2.13 to 6.2.14
@@ -128,2 +128,3 @@ "use strict"; | ||
const currentValueRef = react_1.useRef(value); | ||
const initialValueRef = react_1.useRef(); | ||
/* To prevent stale closures data */ | ||
@@ -178,2 +179,3 @@ const getValueRef = react_1.useRef(getValue); | ||
isDirtyRef.current = !!initialValue; | ||
initialValueRef.current = initialValue; | ||
/* Trigger onChange handlers */ | ||
@@ -367,2 +369,12 @@ setValue(value); | ||
const handleChange = react_1.useCallback((newValue, activeCell) => { | ||
/** | ||
* Make sure we dont call onChange if initialValue is set | ||
* This is to accomodate for editor that fire onChange during initialvalue | ||
* Eg: Slate <Editor value='' onChange /> | ||
*/ | ||
if (initialValueRef.current !== void 0 && | ||
initialValueRef.current === newValue) { | ||
initialValueRef.current = void 0; | ||
return; | ||
} | ||
if (!currentActiveCellRef.current) | ||
@@ -369,0 +381,0 @@ return; |
{ | ||
"name": "@rowsncolumns/grid", | ||
"description": "Declarative React Canvas Grid primitive for Data table, Pivot table, Excel Worksheets", | ||
"version": "6.2.13", | ||
"version": "6.2.14", | ||
"main": "dist/index.js", | ||
@@ -46,3 +46,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "8149f899177ce2eae132793c2742ff4d6cef94ae" | ||
"gitHead": "1b3f4659bdde556ae203dfa1c4d91e0ee5a33d2d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
725305
16072