🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@paprika/data-grid

Package Overview
Dependencies
Maintainers
4
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paprika/data-grid

DataGrid is a wrapper of react-window

4.0.2
latest
Source
npm
Version published
Weekly downloads
303
42.25%
Maintainers
4
Weekly downloads
 
Created
Source

@paprika/data-grid

Description

DataGrid is a wrapper of react-window

Installation

yarn add @paprika/data-grid

or with npm:

npm install @paprika/data-grid

Props

DataGrid

PropTyperequireddefaultDescription
autofocusboolfalsetrueIf the data cell should automatically get focus
borderType[ DataGrid.types.border.GRID, DataGrid.types.border.NONE, DataGrid.types.border.HORIZONTAL, DataGrid.types.border.VERTICAL]falseDataGrid.types.border.GRIDDefine the look for borders in the table types.DataGrid.GRID, types.DataGrid.NONE, etc.
childrennodetrue-
forceTableWidthWithScrollBarsboolfalsefalseThis will force the table to include in the calculation of the table the scrollbar thickness
hasZebraStripesboolfalsefalseAdd an alternate background on the DataGrid's rows
dataarrayOffalse[]Array of data to be stored in the DataGrid
heightnumberfalse600Sets the height of the DataGrid
onClickfuncfalsenullCallback onClick
onKeyDownfuncfalse() => {}Callback onKeyDown press
onPressEnterfuncfalsenullCallback when Enter key is pressed
onPressShiftSpaceBarfuncfalsenullCallback when Shift + Spacebar is pressed
onPressSpaceBarfuncfalsenullCallback when Spacebar is pressed
onRowCheckedfuncfalse() => {}Callback when user click the f key. Might change in the future
onHighlightedfuncfalse() => {}Callback with information about the prev and next highlighted cell
rowHeightnumberfalse36Sets the row height
widthnumberfalsenullSets the DataGrid width

DataGrid.ColumnDefinition

PropTyperequireddefaultDescription
canGrowboolfalsefalse
cellcustomfalse-
cellA11yTextfuncfalsenull
cellPropsfuncfalsenull
cellPropsResetCSSboolfalsefalse
headercustomfalse-
headerA11yTextfuncfalsenull
headerPropsfuncfalsenull
isStickyboolfalsefalse
onClickfuncfalse() => {}
onPressEnterfuncfalsenull
onPressShiftSpaceBarfuncfalsenull
onPressSpaceBarfuncfalsenull
widthnumberfalse182

DataGrid.InfiniteScroll

PropTyperequireddefaultDescription
rowsOffsetnumberfalse25
onReachedOffsetfuncfalse() => {}

Usage

For a basic DataGrid

import DataGrid from "@paprika/data-grid";

const data = [{ column1: "1", column2: "2" }, { column1: "3", column2: "4" }, { column1: "5", column2: "6" }];

return (
  <DataGrid>
    <DataGrid.ColumnDefinition header="Column 1" cell="column1" />
    <DataGrid.ColumnDefinition header="Column 2" cell="column2" />
  </DataGrid>
);

Documentation Need to update link for documentation More detail about these props

FAQs

Package last updated on 29 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts