-
Notifications
You must be signed in to change notification settings - Fork 0
Empty State
📝 Generated from
docs/components/empty-state.md. Edit it there; changes made in the wiki are overwritten.
Internal component rendered when the grid has no rows to display. Replaces the row viewport with a centered icon and message.
| Prop | Type | Description |
|---|---|---|
noRowsLabel |
string |
Text shown beneath the empty-state icon. Controlled by the noRowsLabel DataGrid prop. |
width |
number |
Pixel width of the empty-state container, matched to the grid's total column width. |
overlay |
ReactNode |
The rendered noRowsOverlay slot, shown instead of the icon and label. |
GridEmptyState renders when no row passes the filter, the grid is not loading and no data-source error is shown. The loading state takes precedence — while loading (or a dataSource request) is pending the skeleton rows (or the loadingOverlay slot) are shown instead, and a dataSource error shows the error overlay.
Replace the default empty state with any React component using the noRowsOverlay slot:
function MyEmptyState() {
return (
<div style={{ textAlign: 'center', padding: '40px' }}>
<p>No results match your filter.</p>
<button onClick={clearFilters}>Clear filters</button>
</div>
);
}
<DataGrid
slots={{ noRowsOverlay: MyEmptyState }}
slotProps={{ noRowsOverlay: { /* custom props if needed */ } }}
/>To only change the message text without replacing the whole component, use noRowsLabel:
<DataGrid
noRowsLabel="No employees found for this department."
/>Default value: "No Data"
OpenGridX 3.2.2 · MIT · This wiki is generated from docs/ on every push to main. To fix a page, open a PR against the source file.
Start here
Components
- DataGrid
- Header
- Row
- Cell
- Toolbar
- Pagination
- Filter Panel
- Tooltip
- Column Visibility
- Column Grouping
- Column Resizing
- Empty State
- Error Overlay
- Aggregation Footer
Features
- Virtualization
- Filtering & Search
- Sorting & Pagination
- Custom Pagination
- Editing & Reordering
- Row Selection
- Clipboard
- Pinning
- State Persistence
- Aggregation & Pivot
- Tree Data & Grouping
- Cell Spanning
- Master-Detail
- Keyboard & Accessibility
- List View
- Infinite Scroll
- Data Source
- Loading States
- Toolbar Customization
- Export (CSV, Excel, JSON, Print)
- PDF Export
Customization
Upgrading
Contributing
- Contributing
- Testing
- Roadmap
- DataGrid orchestration
- GridRowMeta
- useGridControlledState
- useGridRowPipeline
- useGridColumns
- useGridVirtualization
- useGridVisibleRows
- useGridScrollSync
- useGridStateSnapshot