List API
API reference docs for the React List component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { List } from '@toolpad/core/Crud';
Name | Type | Default | Description |
---|---|---|---|
dataSource | object | - | Server-side data source. |
dataSourceCache | { cache: object, clear: func, get: func, set: func, ttl: number } | - | Cache for the data source. |
initialPageSize | number | 100 | Initial number of rows to show per page. |
localeText | object | - | Locale text for the component. |
onCreateClick | func | - | Callback fired when the "Create" button is clicked. |
onDelete | func | - | Callback fired when the item is successfully deleted. |
onEditClick | func | - | Callback fired when the "Edit" button is clicked. |
onRowClick | func | - | Callback fired when a row is clicked. Not called if the target clicked is an interactive element added by the built-in columns. |
slotProps | { dataGrid?: object } | {} | The props used for each slot inside. |
slots | { dataGrid?: func } | {} | The components used for each slot inside. See Slots API below for more details. |
Slot name | Class name | Default component | Description |
---|---|---|---|
dataGrid | DataGrid | The DataGrid component used to list the items. |
Source code
If you did not find the information in this page, consider having a look at the implementation of the component for more detail.