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 2.8.11 to 2.8.12

3

dist/Cell.js

@@ -38,7 +38,6 @@ "use strict";

context.fillStyle = textColor;
const lineTranslateX = align === "center" ? (width || 0) / 2 : x;
const lineTranslateX = align === "center" ? (width || 0) / 2 : padding;
// @ts-ignore
context.textAlign = align;
context.fillText(value, lineTranslateX, (height || 0) - padding);
// context.fillText(value, padding, (height || 0) - padding);
} })) : null));

@@ -45,0 +44,0 @@ });

@@ -15,4 +15,4 @@ "use strict";

const [selections, setSelections] = react_1.useState(initialSelections);
const selectionStart = react_1.useRef();
const selectionEnd = react_1.useRef();
const selectionStart = react_1.useRef(null);
const selectionEnd = react_1.useRef(null);
const isSelecting = react_1.useRef();

@@ -496,2 +496,11 @@ const firstActiveCell = react_1.useRef(null);

}, [rowCount, columnCount, activeCell, selections]);
/**
* User modified active cell deliberately
*/
const handleSetActiveCell = react_1.useCallback((coords) => {
selectionStart.current = coords;
firstActiveCell.current = coords;
selectionEnd.current = coords;
setActiveCell(coords);
}, []);
return {

@@ -504,3 +513,3 @@ activeCell,

setSelections,
setActiveCell,
setActiveCell: handleSetActiveCell,
};

@@ -507,0 +516,0 @@ };

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

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

@@ -102,4 +102,4 @@ import React, { useState, useCallback, useRef, useEffect } from "react";

);
const selectionStart = useRef<CellInterface>();
const selectionEnd = useRef<CellInterface>();
const selectionStart = useRef<CellInterface | null>(null);
const selectionEnd = useRef<CellInterface | null>(null);
const isSelecting = useRef<boolean>();

@@ -414,2 +414,3 @@ const firstActiveCell = useRef<CellInterface | null>(null);

return;
var { rowIndex, columnIndex } = modify

@@ -656,2 +657,12 @@ ? selectionEnd.current

/**
* User modified active cell deliberately
*/
const handleSetActiveCell = useCallback((coords: CellInterface | null) => {
selectionStart.current = coords;
firstActiveCell.current = coords;
selectionEnd.current = coords;
setActiveCell(coords);
}, []);
return {

@@ -664,3 +675,3 @@ activeCell,

setSelections,
setActiveCell,
setActiveCell: handleSetActiveCell,
};

@@ -667,0 +678,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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