Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-konva-grid

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-konva-grid - npm Package Compare versions

Comparing version 3.0.6 to 3.0.7

2

package.json
{
"name": "react-konva-grid",
"description": "Declarative React Canvas Grid primitive for Data table, Pivot table, Excel Worksheets",
"version": "3.0.6",
"version": "3.0.7",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -28,6 +28,8 @@ import React, { useReducer, useRef, useEffect, useCallback } from "react";

export type Path = [string, any];
export interface Patches {
path: [string, any];
path: Path;
value: any;
operator: Operator;
op: Operator;
}

@@ -42,8 +44,17 @@

export function createPatches(path, value, previousValue, op = "replace") {
const patches = { op, value, path };
const inversePatches = { op, value: previousValue, path };
export function createPatches(
path: Path,
value: any,
previousValue: any,
op: Operator = "replace"
): Stack {
const patches: Patches = { op, value, path };
const inversePatches: Patches = { op, value: previousValue, path };
return { patches, inversePatches };
}
/**
* Undo/Redo hook
* @param
*/
const useUndo = ({ onRedo, onUndo }: UndoProps): UndoResults => {

@@ -54,8 +65,2 @@ const undoStack = useRef<Stack[]>([]);

useEffect(() => {
document.addEventListener("undo", () => {
console.log("calld");
});
}, []);
const handleKeyDown = useCallback(

@@ -62,0 +67,0 @@ (e: React.KeyboardEvent<HTMLDivElement>) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc