New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.4.3 to 2.4.4

src/hooks/useSelection.test.ts

2

dist/hooks/useAutoSizer.js

@@ -12,3 +12,3 @@ "use strict";

*/
const useAutoSizer = ({ gridRef, getValue, initialVisibleRows = 20, cellSpacing = 10, minColumnWidth = 40, timeout = 300, resizeOnScroll = true, font = "12px Arial", }) => {
const useAutoSizer = ({ gridRef, getValue, initialVisibleRows = 20, cellSpacing = 10, minColumnWidth = 60, timeout = 300, resizeOnScroll = true, font = "12px Arial", }) => {
const autoSizer = react_1.useRef(AutoSizerCanvas(font));

@@ -15,0 +15,0 @@ const [viewport, setViewport] = react_1.useState({

@@ -5,5 +5,5 @@ import React from "react";

gridRef?: React.MutableRefObject<GridRef>;
initialSelections?: AreaProps[];
columnCount: number;
rowCount: number;
initialSelections: AreaProps[];
columnCount?: number;
rowCount?: number;
}

@@ -14,3 +14,3 @@ /**

*/
declare const useSelection: (options?: UseSelectionOptions) => {
declare const useSelection: (options?: UseSelectionOptions | undefined) => {
selections: AreaProps[];

@@ -17,0 +17,0 @@ onMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const defaultOptions = {
initialSelection: [],
columnCount: 0,
rowCount: 0,
};
var Direction;

@@ -20,4 +15,4 @@ (function (Direction) {

*/
const useSelection = (options = defaultOptions) => {
const { gridRef, initialSelections = [], columnCount, rowCount } = options;
const useSelection = (options) => {
const { gridRef, initialSelections = [], columnCount = 0, rowCount = 0 } = options || {};
const [selections, setSelections] = react_1.useState(initialSelections);

@@ -24,0 +19,0 @@ const selectionStart = react_1.useRef();

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

@@ -56,2 +56,3 @@ "license": "MIT",

"@testing-library/react": "^10.0.4",
"@testing-library/react-hooks": "^3.2.1",
"@types/jest": "^25.2.3",

@@ -67,2 +68,3 @@ "@types/react": "^16.9.35",

"react-docgen-typescript-loader": "^3.7.2",
"react-test-renderer": "^16.13.1",
"react-use": "^15.1.0",

@@ -69,0 +71,0 @@ "rimraf": "^3.0.2",

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

cellSpacing = 10,
minColumnWidth = 40,
minColumnWidth = 60,
timeout = 300,

@@ -36,0 +36,0 @@ resizeOnScroll = true,

@@ -6,13 +6,7 @@ import React, { useState, useCallback, useRef } from "react";

gridRef?: React.MutableRefObject<GridRef>;
initialSelections?: AreaProps[];
columnCount: number;
rowCount: number;
initialSelections: AreaProps[];
columnCount?: number;
rowCount?: number;
}
const defaultOptions = {
initialSelection: [],
columnCount: 0,
rowCount: 0,
};
enum Direction {

@@ -29,4 +23,5 @@ Up = "UP",

*/
const useSelection = (options: UseSelectionOptions = defaultOptions) => {
const { gridRef, initialSelections = [], columnCount, rowCount } = options;
const useSelection = (options?: UseSelectionOptions) => {
const { gridRef, initialSelections = [], columnCount = 0, rowCount = 0 } =
options || {};
const [selections, setSelections] = useState<AreaProps[]>(initialSelections);

@@ -33,0 +28,0 @@ const selectionStart = useRef<CellInterface>();

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