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.5.3 to 2.5.4

54

dist/Grid.js

@@ -146,29 +146,2 @@ "use strict";

/**
* Resize one or more columns
*/
const resizeColumns = react_1.useCallback((indexes) => {
const leftMost = Math.min(...indexes);
resetAfterIndices({ columnIndex: leftMost }, false);
instanceProps.current.recalcColumnIndexes = indexes;
forceRender();
}, []);
/* Always reset after a render: TODO: Find a better way */
react_1.useEffect(() => {
if (instanceProps.current.recalcColumnIndexes.length) {
instanceProps.current.recalcColumnIndexes.length = 0;
}
if (instanceProps.current.recalcRowIndexes.length) {
instanceProps.current.recalcRowIndexes.length = 0;
}
});
/**
* Resize one or more rows
*/
const resizeRows = react_1.useCallback((indexes) => {
const topMost = Math.min(...indexes);
resetAfterIndices({ rowIndex: topMost }, false);
instanceProps.current.recalcRowIndexes = indexes;
forceRender();
}, []);
/**
* Create a map of merged cells

@@ -240,2 +213,29 @@ * [rowIndex, columnindex] => [parentRowIndex, parentColumnIndex]

const estimatedTotalWidth = helpers_1.getEstimatedTotalWidth(columnCount, instanceProps.current);
/**
* Resize one or more columns
*/
const resizeColumns = react_1.useCallback((indexes) => {
const leftMost = Math.min(...indexes);
resetAfterIndices({ columnIndex: leftMost }, false);
instanceProps.current.recalcColumnIndexes = indexes;
forceRender();
}, []);
/**
* Resize one or more rows
*/
const resizeRows = react_1.useCallback((indexes) => {
const topMost = Math.min(...indexes);
resetAfterIndices({ rowIndex: topMost }, false);
instanceProps.current.recalcRowIndexes = indexes;
forceRender();
}, []);
/* Always if the viewport changes */
react_1.useEffect(() => {
if (instanceProps.current.recalcColumnIndexes.length) {
instanceProps.current.recalcColumnIndexes.length = 0;
}
if (instanceProps.current.recalcRowIndexes.length) {
instanceProps.current.recalcRowIndexes.length = 0;
}
}, [rowStopIndex, columnStopIndex]);
/* Handle vertical scroll */

@@ -242,0 +242,0 @@ const handleScroll = react_1.useCallback((e) => {

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

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

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