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

react-data-grid

Package Overview
Dependencies
Maintainers
1
Versions
1047
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-data-grid - npm Package Compare versions

Comparing version 7.0.0-beta.22 to 7.0.0-beta.23

71

lib/index.d.ts

@@ -22,5 +22,20 @@ import type { Key } from 'react';

export declare type CellNavigationMode = 'NONE' | 'CHANGE_ROW' | 'LOOP_OVER_ROW';
export declare interface CellClickArgs<TRow, TSummaryRow> {
row: TRow;
column: CalculatedColumn<TRow, TSummaryRow>;
selectCell: (enableEditor?: boolean) => void;
}
export declare interface CellRendererProps<TRow, TSummaryRow> extends Pick<RowRendererProps<TRow, TSummaryRow>, 'onRowClick' | 'onRowDoubleClick' | 'selectCell' | 'skipCellFocusRef'>, Omit_2<React.HTMLAttributes<HTMLDivElement>, 'style' | 'children'> {
declare type CellEvent<E extends React.SyntheticEvent<HTMLDivElement>> = E & {
preventGridDefault: () => void;
isGridDefaultPrevented: () => boolean;
};
export declare type CellKeyboardEvent = CellEvent<React.KeyboardEvent<HTMLDivElement>>;
export declare type CellKeyDownArgs<TRow, TSummaryRow = unknown> = SelectCellKeyDownArgs<TRow, TSummaryRow> | EditCellKeyDownArgs<TRow, TSummaryRow>;
export declare type CellMouseEvent = CellEvent<React.MouseEvent<HTMLDivElement>>;
export declare interface CellRendererProps<TRow, TSummaryRow> extends Pick<RowRendererProps<TRow, TSummaryRow>, 'selectCell' | 'skipCellFocusRef'>, Omit_2<React.HTMLAttributes<HTMLDivElement>, 'style' | 'children' | 'onClick' | 'onDoubleClick' | 'onContextMenu'> {
column: CalculatedColumn<TRow, TSummaryRow>;

@@ -33,2 +48,5 @@ colSpan: number | undefined;

dragHandle: ReactElement<React.HTMLAttributes<HTMLDivElement>> | undefined;
onClick: RowRendererProps<TRow, TSummaryRow>['onCellClick'];
onDoubleClick: RowRendererProps<TRow, TSummaryRow>['onCellDoubleClick'];
onContextMenu: RowRendererProps<TRow, TSummaryRow>['onCellContextMenu'];
onRowChange: (column: CalculatedColumn<TRow, TSummaryRow>, newRow: TRow) => void;

@@ -89,10 +107,4 @@ }

readonly renderFormatter?: Maybe<boolean>;
/** @default false */
readonly editOnClick?: Maybe<boolean>;
/** @default true */
readonly commitOnOutsideClick?: Maybe<boolean>;
/** Prevent default to cancel editing */
readonly onCellKeyDown?: Maybe<(event: React.KeyboardEvent<HTMLDivElement>) => void>;
/** Control the default cell navigation behavior while the editor is open */
readonly onNavigation?: Maybe<(event: React.KeyboardEvent<HTMLDivElement>) => boolean>;
}>;

@@ -175,6 +187,9 @@ /** Header renderer for each header cell */

*/
/** Function called whenever a row is clicked */
onRowClick?: Maybe<(row: R, column: CalculatedColumn<R, SR>) => void>;
/** Function called whenever a row is double clicked */
onRowDoubleClick?: Maybe<(row: R, column: CalculatedColumn<R, SR>) => void>;
/** Function called whenever a cell is clicked */
onCellClick?: Maybe<(args: CellClickArgs<R, SR>, event: CellMouseEvent) => void>;
/** Function called whenever a cell is double clicked */
onCellDoubleClick?: Maybe<(args: CellClickArgs<R, SR>, event: CellMouseEvent) => void>;
/** Function called whenever a cell is right clicked */
onCellContextMenu?: Maybe<(args: CellClickArgs<R, SR>, event: CellMouseEvent) => void>;
onCellKeyDown?: Maybe<(args: CellKeyDownArgs<R, SR>, event: CellKeyboardEvent) => void>;
/** Called when the grid is scrolled */

@@ -187,4 +202,2 @@ onScroll?: Maybe<(event: React.UIEvent<HTMLDivElement>) => void>;

*/
/** @default 'NONE' */
cellNavigationMode?: Maybe<CellNavigationMode>;
/** @default true */

@@ -209,2 +222,10 @@ enableVirtualization?: Maybe<boolean>;

declare interface EditCellKeyDownArgs<TRow, TSummaryRow> {
mode: 'EDIT';
row: TRow;
column: CalculatedColumn<TRow, TSummaryRow>;
rowIdx: number;
onClose: (commitChanges?: boolean) => void;
}
export declare interface EditorProps<TRow, TSummaryRow = unknown> {

@@ -259,4 +280,2 @@ column: CalculatedColumn<TRow, TSummaryRow>;

onSort: (ctrlClick: boolean) => void;
allRowsSelected: boolean;
onAllRowsSelectionChange: (checked: boolean) => void;
isCellSelected: boolean;

@@ -298,3 +317,3 @@ }

export declare interface RowRendererProps<TRow, TSummaryRow = unknown> extends Omit_2<React.HTMLAttributes<HTMLDivElement>, 'style' | 'children'> {
export declare interface RowRendererProps<TRow, TSummaryRow = unknown> extends Omit_2<React.HTMLAttributes<HTMLDivElement>, 'style' | 'children'>, Pick<DataGridProps<TRow, TSummaryRow>, 'onCellClick' | 'onCellDoubleClick' | 'onCellContextMenu'> {
viewportColumns: readonly CalculatedColumn<TRow, TSummaryRow>[];

@@ -314,4 +333,2 @@ row: TRow;

onRowChange: (column: CalculatedColumn<TRow, TSummaryRow>, rowIdx: number, newRow: TRow) => void;
onRowClick: Maybe<(row: TRow, column: CalculatedColumn<TRow, TSummaryRow>) => void>;
onRowDoubleClick: Maybe<(row: TRow, column: CalculatedColumn<TRow, TSummaryRow>) => void>;
rowClass: Maybe<(row: TRow) => Maybe<string>>;

@@ -337,9 +354,21 @@ setDraggedOverRowIdx: ((overRowIdx: number) => void) | undefined;

declare interface SelectCellKeyDownArgs<TRow, TSummaryRow> {
mode: 'SELECT';
row: TRow;
column: CalculatedColumn<TRow, TSummaryRow>;
rowIdx: number;
selectCell: (position: Position, enableEditor?: Maybe<boolean>) => void;
}
export declare const SelectColumn: Column<any, any>;
export declare interface SelectRowEvent<TRow> {
export declare type SelectRowEvent<TRow> = {
type: 'HEADER';
checked: boolean;
} | {
type: 'ROW';
row: TRow;
checked: boolean;
isShiftClick: boolean;
}
};

@@ -346,0 +375,0 @@ declare type SharedDivProps = Pick<React.HTMLAttributes<HTMLDivElement>, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'className' | 'style'>;

{
"name": "react-data-grid",
"version": "7.0.0-beta.22",
"version": "7.0.0-beta.23",
"license": "MIT",

@@ -60,5 +60,11 @@ "description": "Feature-rich and customizable data grid React component",

"@faker-js/faker": "^7.1.0",
"@linaria/babel-preset": "^4.2.3",
"@linaria/rollup": "^4.2.0",
"@linaria/webpack5-loader": "^4.1.6",
"@linaria/babel-preset": "4.3.3",
"@linaria/core": "4.2.5",
"@linaria/logger": "4.0.0",
"@linaria/rollup": "4.3.2",
"@linaria/shaker": "4.2.7",
"@linaria/tags": "4.3.0",
"@linaria/utils": "4.3.0",
"@linaria/vite": "4.2.5",
"@linaria/webpack5-loader": "4.1.11",
"@microsoft/api-extractor": "^7.23.0",

@@ -89,2 +95,3 @@ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",

"eslint-plugin-sonarjs": "^0.18.0",
"eslint-plugin-testing-library": "^5.9.1",
"html-webpack-plugin": "^5.5.0",

@@ -102,3 +109,2 @@ "jest": "^29.0.0",

"react": "^18.1.0",
"react-contextmenu": "^2.14.0",
"react-dnd": "^16.0.1",

@@ -105,0 +111,0 @@ "react-dnd-html5-backend": "^16.0.1",

@@ -191,6 +191,10 @@ # react-data-grid

###### `onRowClick?: Maybe<(row: R, column: CalculatedColumn<R, SR>) => void>`
###### `onCellClick?: Maybe<(args: CellClickArgs<R, SR>, event: CellMouseEvent) => void>`
###### `onRowDoubleClick?: Maybe<(row: R, column: CalculatedColumn<R, SR>) => void>`
###### `onCellDoubleClick?: Maybe<(args: CellClickArgs<R, SR>, event: CellMouseEvent) => void>`
###### `onCellContextMenu?: Maybe<(args: CellClickArgs<R, SR>, event: CellMouseEvent) => void>`
###### `onCellKeyDown?: Maybe<(args: CellKeyDownArgs<R, SR>, event: CellKeyboardEvent) => void>`
###### `onScroll?: Maybe<(event: React.UIEvent<HTMLDivElement>) => void>`

@@ -200,4 +204,2 @@

###### `cellNavigationMode?: Maybe<CellNavigationMode>`
###### `enableVirtualization?: Maybe<boolean>`

@@ -204,0 +206,0 @@

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 too big to display

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