react-datasheet-grid
Advanced tools
Comparing version 3.3.8 to 3.3.9
@@ -6,3 +6,3 @@ import React, { useState } from 'react'; | ||
return (React.createElement("div", { className: "dsg-add-row" }, | ||
React.createElement("button", { className: "dsg-add-row-btn", onClick: () => addRows(value) }, "Add"), | ||
React.createElement("button", { type: "button", className: "dsg-add-row-btn", onClick: () => addRows(value) }, "Add"), | ||
' ', | ||
@@ -9,0 +9,0 @@ React.createElement("input", { className: "dsg-add-row-input", value: rawValue, onBlur: () => setRawValue(String(value)), type: "number", min: 1, onChange: (e) => { |
@@ -443,3 +443,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
setSelectionCell({ | ||
col: min.col + pasteData[0].length - 1, | ||
col: Math.min(min.col + pasteData[0].length - 1, columns.length - (hasStickyRightColumn ? 3 : 2)), | ||
row: max.row, | ||
@@ -446,0 +446,0 @@ }); |
@@ -1,10 +0,12 @@ | ||
import { useMemo, useState } from 'react'; | ||
import { useEffect, useMemo, useRef, useState } from 'react'; | ||
import { debounce } from 'throttle-debounce'; | ||
export const useDebounceState = (defaultValue, delay) => { | ||
const [debouncedValue, setDebouncedValue] = useState(defaultValue); | ||
const setValue = useMemo(() => debounce(delay, (newValue) => { | ||
const cancelRef = useRef(); | ||
useEffect(() => () => { var _a; return (_a = cancelRef.current) === null || _a === void 0 ? void 0 : _a.cancel(); }, []); | ||
const setValue = useMemo(() => (cancelRef.current = debounce(delay, (newValue) => { | ||
setDebouncedValue(newValue); | ||
}), [delay]); | ||
})), [delay]); | ||
return [debouncedValue, setValue]; | ||
}; | ||
//# sourceMappingURL=useDebounceState.js.map |
{ | ||
"name": "react-datasheet-grid", | ||
"version": "3.3.8", | ||
"version": "3.3.9", | ||
"description": "An Excel-like React component to create beautiful spreadsheets.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# react-datasheet-grid | ||
![Travis (.com)](https://img.shields.io/travis/com/Equify/react-datasheet-grid) | ||
![Coveralls](https://img.shields.io/coveralls/github/Equify/react-datasheet-grid) | ||
![npm](https://img.shields.io/npm/dm/react-datasheet-grid) | ||
![GitHub last commit](https://img.shields.io/github/last-commit/Equify/react-datasheet-grid) | ||
[![Travis (.com)](https://img.shields.io/travis/com/Equify/react-datasheet-grid)](https://app.travis-ci.com/github/Equify/react-datasheet-grid) | ||
[![Coveralls](https://img.shields.io/coveralls/github/Equify/react-datasheet-grid)](https://coveralls.io/github/Equify/react-datasheet-grid) | ||
[![npm](https://img.shields.io/npm/dm/react-datasheet-grid)](https://www.npmjs.com/package/react-datasheet-grid) | ||
[![GitHub last commit](https://img.shields.io/github/last-commit/Equify/react-datasheet-grid)](https://github.com/Equify/react-datasheet-grid) | ||
![npm bundle size](https://img.shields.io/bundlephobia/min/react-datasheet-grid) | ||
@@ -8,0 +8,0 @@ [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
247493
2865