streaksheet
Advanced tools
Comparing version 0.7.11 to 0.7.12
@@ -112,2 +112,3 @@ import * as React from 'react'; | ||
export interface StreakSheetRef { | ||
focus(): void; | ||
getSelectedCells(): CellKeys[]; | ||
@@ -114,0 +115,0 @@ highlightNextSearchResult(): void; |
@@ -150,2 +150,3 @@ "use strict"; | ||
var gridRef = (0, React.useRef)(null); | ||
var innerElementRef = (0, React.useRef)(null); | ||
var firstRender = (0, React.useRef)(true); | ||
@@ -289,2 +290,7 @@ (0, React.useEffect)(function () { | ||
return { | ||
focus: function focus() { | ||
var _innerElementRef$curr; | ||
(_innerElementRef$curr = innerElementRef.current) === null || _innerElementRef$curr === void 0 ? void 0 : _innerElementRef$curr.focus(); | ||
}, | ||
getSelectedCells: function getSelectedCells() { | ||
@@ -432,2 +438,3 @@ var cellKeys = selection.map(function (_ref) { | ||
height: height, | ||
innerRef: innerElementRef, | ||
innerElementType: _InnerElement["default"], | ||
@@ -434,0 +441,0 @@ itemData: itemData, |
import * as React from 'react'; | ||
import { InnerElementCtx } from './internalTypes'; | ||
export declare const InternalSheetInnerElementCtx: React.Context<InnerElementCtx | undefined>; | ||
export default function InnerElement(props: { | ||
export interface InnerElementRef { | ||
focus: () => void; | ||
} | ||
declare const _default: React.ForwardRefExoticComponent<{ | ||
children: React.ReactChildren; | ||
style: React.CSSProperties; | ||
}): JSX.Element; | ||
} & React.RefAttributes<HTMLDivElement>>; | ||
export default _default; |
@@ -10,4 +10,3 @@ "use strict"; | ||
}); | ||
exports["default"] = InnerElement; | ||
exports.InternalSheetInnerElementCtx = void 0; | ||
exports["default"] = exports.InternalSheetInnerElementCtx = void 0; | ||
@@ -33,2 +32,3 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var DEFAULT_MINIMUM_COLUMN_WIDTH = 50; // px | ||
// This component is a override on top of react-window's default grid-encapsulating | ||
@@ -38,6 +38,3 @@ // HTML element, providing some visual elements that appear within the sheet that | ||
// headers. | ||
function InnerElement(props) { | ||
var ref = React.useRef(null); | ||
var _default = React.forwardRef(function InnerElement(props, ref) { | ||
var _ref = React.useContext(InternalSheetInnerElementCtx), | ||
@@ -138,3 +135,5 @@ copiedRegion = _ref.copiedRegion, | ||
})); | ||
} | ||
}); | ||
exports["default"] = _default; | ||
//# sourceMappingURL=InnerElement.js.map |
{ | ||
"name": "streaksheet", | ||
"version": "0.7.11", | ||
"version": "0.7.12", | ||
"author": "Chris Cowan <agentme49@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
373346
3312