You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-32Lines changed: 36 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -242,7 +242,7 @@ Control column widths using the [`width`](#width-maybenumber--string), [`minWidt
242
242
243
243
### Custom Renderers
244
244
245
-
Replace default components with custom implementations using the [`renderers`](#renderers-mayberenderersr-sr) prop. Columns can also have custom renderers using the [`renderCell`](#rendercell-maybeprops-rendercellpropstrow-tsummaryrow--reactnode), [`renderHeaderCell`](#renderheadercell-maybeprops-renderheadercellpropstrow-tsummaryrow--reactnode), [`renderSummaryCell`](#rendersummarycell-maybeprops-rendersummarycellpropstsummaryrow-trow--reactnode), [`renderGroupCell`](#rendergroupcell-maybeprops-rendergroupcellpropstrow-tsummaryrow--reactnode), and [`renderEditCell`](#rendereditcell-maybeprops-rendereditcellpropstrow-tsummaryrow--reactnode) properties.
245
+
Replace default components with custom implementations using the [`renderers`](#renderers-mayberenderersr-sr) prop. Columns can also have custom renderers using the [`renderCell`](#rendercell-maybeprops-rendercellcontentpropstrow-tsummaryrow--reactnode), [`renderHeaderCell`](#renderheadercell-maybeprops-renderheadercellcontentpropstrow-tsummaryrow--reactnode), [`renderSummaryCell`](#rendersummarycell-maybeprops-rendersummarycellcontentpropstsummaryrow-trow--reactnode), [`renderGroupCell`](#rendergroupcell-maybeprops-rendergroupcellcontentpropstrow-tsummaryrow--reactnode), and [`renderEditCell`](#rendereditcell-maybeprops-rendereditcellcontentpropstrow-tsummaryrow--reactnode) properties.
246
246
247
247
## API Reference
248
248
@@ -869,6 +869,8 @@ function rowGrouper(rows: readonly Row[], columnKey: string): Record<string, rea
869
869
}
870
870
```
871
871
872
+
:warning:**Performance:** Define this function outside your component or memoize it with `useCallback` to prevent unnecessary re-renders.
873
+
872
874
###### `expandedGroupIds: ReadonlySet<unknown>`
873
875
874
876
**Required.** A set of group IDs that are currently expanded. Group IDs are generated by `groupIdGetter`.
@@ -898,6 +900,8 @@ function MyGrid() {
898
900
899
901
Function to generate unique IDs for group rows. If not provided, a default implementation is used that concatenates parent and group keys with `__`.
900
902
903
+
:warning:**Performance:** Define this function outside your component or memoize it with `useCallback` to prevent unnecessary re-renders.
**Note:** Unlike `DataGrid`, the `rowHeight` function receives [`RowHeightArgs<R>`](#rowheightargstrow) which includes a `type` property to distinguish between regular rows and group rows:
@@ -927,11 +931,11 @@ The default cell component. Can be wrapped via the `renderers.renderCell` prop.
0 commit comments