DataGrid
Used to show data in a matrix or grid. You can give it a list of items and a function to render those items. Items get layed out in a grid and displayed.
Installation
Examples
Properties
data
Array
The items to render into a grid. This will be an array of any data. The data is passed into the render function and can be used there to render the actual grid cell.
renderItem
(item: any, key: number) => JSX.Element
A function which can be used to return the contents of each cell. The function will be passed 2 parameters: item
: The individual item from the list of items passed as the data
prop key
: The index of the item in the list This function should return a react element
columns
number
The number of columns to display. Items will be layed out row by row and the number of columns in each row is specified here
className
string
Any additional css class names to include in the component
data
The items to render into a grid. This will be an array of any data. The data is passed into the render function and can be used there to render the actual grid cell.
Array
renderItem
A function which can be used to return the contents of each cell. The function will be passed 2 parameters:
item
: The individual item from the list of items passed as the data
prop key
: The index of the item in the list
This function should return a react element
(item: any, key: number) => JSX.Element
columns
The number of columns to display. Items will be layed out row by row and the number of columns in each row is specified here
number
className
Any additional css class names to include in the component
string
Last updated