4.0.1 • Published 1 year ago

@paprika/data-grid v4.0.1

Weekly downloads
1,904
License
MIT
Repository
github
Last release
1 year ago

@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.VERTICALfalseDataGrid.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

Links

4.0.1

1 year ago

4.0.1-next.0

1 year ago

4.0.0

1 year ago

4.0.0-next.0

1 year ago

3.0.2-next.0

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.3-next.0

2 years ago

3.0.0-next.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

3.0.1-next.0

2 years ago

2.0.4

3 years ago

2.0.4-next.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.3-next.0

3 years ago

2.0.2-next.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

2.0.1-next.0

3 years ago

2.0.0-next.0

3 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.31-next.1

3 years ago

1.0.32-next.0

3 years ago

1.0.31-next.0

3 years ago

1.0.32-next.1

3 years ago

1.0.33-next.0

3 years ago

1.0.30

3 years ago

1.0.30-next.2

3 years ago

1.0.30-next.0

3 years ago

1.0.30-next.1

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

4 years ago

1.0.28-next.1

3 years ago

1.0.29-next.0

3 years ago

1.0.28-next.0

3 years ago

1.0.26-next.0

4 years ago

1.0.27-next.0

4 years ago

1.0.26-next.1

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.24-next.0

4 years ago

1.0.25-next.3

4 years ago

1.0.25-next.2

4 years ago

1.0.25-next.1

4 years ago

1.0.25-next.0

4 years ago

1.0.22-next.0

4 years ago

1.0.23-next.1

4 years ago

1.0.23-next.0

4 years ago

1.0.22

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.20-next.0

4 years ago

1.0.20

4 years ago

1.0.21-next.0

4 years ago

1.0.19

4 years ago

1.0.19-next.0

4 years ago

1.0.18

4 years ago

1.0.18-next.0

4 years ago

1.0.17-next.0

4 years ago

1.0.17

4 years ago

1.0.16-next.0

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.15-next.0

4 years ago

1.0.14

4 years ago

1.0.14-next.1

4 years ago

1.0.14-next.0

4 years ago

1.0.13-next.0

4 years ago

1.0.13-next.1

4 years ago

1.0.12-next.0

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11-next.0

4 years ago

1.0.11-next.1

4 years ago

1.0.10-next.1

4 years ago

1.0.10-next.0

4 years ago

1.0.10-next.2

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.9-alpha.3

4 years ago

1.0.9-alpha.2

4 years ago

1.0.9-alpha.1

4 years ago

1.0.9-alpha.0

4 years ago

1.0.8

4 years ago

1.0.8-alpha.0

4 years ago

1.0.7

4 years ago

1.0.7-alpha.0

4 years ago

1.0.6-alpha.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.5-alpha.1

4 years ago

1.0.5-alpha.0

4 years ago

1.0.4

4 years ago

1.0.4-alpha.0

4 years ago

1.0.3

5 years ago

1.0.3-alpha.2

5 years ago

1.0.3-alpha.1

5 years ago

1.0.3-alpha.0

5 years ago

1.0.2

5 years ago

1.0.2-alpha.2

5 years ago

1.0.2-alpha.1

5 years ago

1.0.1

5 years ago

1.0.2-alpha.0

5 years ago

1.0.1-alpha.1

5 years ago

1.0.1-alpha.0

5 years ago

1.0.0

5 years ago

0.3.24

5 years ago

0.3.24-alpha.4

5 years ago

0.3.24-alpha.3

5 years ago

0.3.24-alpha.1

5 years ago

0.3.24-alpha.2

5 years ago

0.3.24-alpha.0

5 years ago

0.3.23

5 years ago

0.3.22

5 years ago

0.3.21

5 years ago

0.3.20

5 years ago

0.3.19

5 years ago

0.3.18

5 years ago

0.3.17

5 years ago

0.3.16

5 years ago

0.3.15

5 years ago

0.3.14

5 years ago

0.3.13

5 years ago

0.3.12

5 years ago

0.3.11

5 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.2

5 years ago

0.3.3

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.10

5 years ago

0.1.11

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago