Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-data-grid-temp

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-data-grid-temp - npm Package Compare versions

Comparing version 7.0.0-canary.18.0 to 7.0.0-canary.18.1

26

lib/Cell.js

@@ -58,14 +58,24 @@ var __assign = (this && this.__assign) || function () {

function getCellContent() {
var render;
if (selectedCellProps && selectedCellProps.mode === 'SELECT') {
render = (React.createElement(React.Fragment, null,
React.createElement(column.formatter, { column: column, rowIdx: rowIdx, row: row, isCellSelected: isSelected, isRowSelected: isRowSelected, onRowSelectionChange: onRowSelectionChange }),
(selectedCellProps === null || selectedCellProps === void 0 ? void 0 : selectedCellProps.dragHandleProps) && (React.createElement("div", __assign({ className: "rdg-cell-drag-handle" }, selectedCellProps.dragHandleProps)))));
}
if (selectedCellProps && selectedCellProps.mode === 'EDIT') {
var _a = selectedCellProps.editorContainerProps, editorPortalTarget = _a.editorPortalTarget, editorProps = __rest(_a, ["editorPortalTarget"]);
var _b = document.scrollingElement || document.documentElement, docTop = _b.scrollTop, docLeft = _b.scrollLeft;
var _c = cellRef.current.getBoundingClientRect(), left = _c.left, top_1 = _c.top;
var gridLeft = left + docLeft;
var gridTop = top_1 + docTop;
return (React.createElement(EditorPortal, { target: editorPortalTarget },
React.createElement(EditorContainer, __assign({}, editorProps, { rowIdx: rowIdx, row: row, column: column, left: gridLeft, top: gridTop }))));
if (cellRef.current) {
var _c = cellRef.current.getBoundingClientRect(), left = _c.left, top_1 = _c.top;
var gridLeft = left + docLeft;
var gridTop = top_1 + docTop;
render = (React.createElement(EditorPortal, { target: editorPortalTarget },
React.createElement(EditorContainer, __assign({}, editorProps, { rowIdx: rowIdx, row: row, column: column, left: gridLeft, top: gridTop }))));
}
else {
// 未获得 cellRef.current 正常显示表格
render = (React.createElement(column.formatter, { column: column, rowIdx: rowIdx, row: row, isCellSelected: isSelected, isRowSelected: isRowSelected, onRowSelectionChange: onRowSelectionChange }));
}
}
return (React.createElement(React.Fragment, null,
React.createElement(column.formatter, { column: column, rowIdx: rowIdx, row: row, isCellSelected: isSelected, isRowSelected: isRowSelected, onRowSelectionChange: onRowSelectionChange }),
(selectedCellProps === null || selectedCellProps === void 0 ? void 0 : selectedCellProps.dragHandleProps) && (React.createElement("div", __assign({ className: "rdg-cell-drag-handle" }, selectedCellProps.dragHandleProps)))));
return render;
}

@@ -72,0 +82,0 @@ return (React.createElement("div", __assign({ role: "gridcell", "aria-colindex": column.idx + 1, "aria-selected": isSelected, ref: useCombinedRefs(cellRef, ref), className: className, style: {

@@ -108,3 +108,3 @@ import { KeyboardEvent } from 'react';

}
interface SelectedCellPropsSelect extends SelectedCellPropsBase {
export interface SelectedCellPropsSelect extends SelectedCellPropsBase {
mode: 'SELECT';

@@ -170,6 +170,2 @@ dragHandleProps?: Pick<React.HTMLAttributes<HTMLDivElement>, 'onMouseDown' | 'onDoubleClick'>;

}
export interface KeyDownEvent {
event: React.KeyboardEvent<HTMLDivElement>;
selectedPosition: Position;
}
export interface SortColumn {

@@ -176,0 +172,0 @@ columnKey: string;

{
"name": "react-data-grid-temp",
"version": "7.0.0-canary.18.0",
"version": "7.0.0-canary.18.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like",

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