API REFERENCE
cellClassRules
Rules for applying CSS classes conditionally.
What does this API do?
Rules for applying CSS classes conditionally.
Exact input and result types
cellClassRules?: Record<
string,
GridCallback<[CellCallbackParams<TData, TValue, TContext>], boolean> | string
>| Item | Value |
|---|---|
| Required | Optional |
| Input type | Record< string, GridCallback<[CellCallbackParams<TData, TValue, TContext>], boolean> | string > |
Usage flow
Set this on an individual column object in columnDefs. Pass arrays, objects, and callbacks through JavaScript, and use new arrays or objects when applying changes.
Read related types
Feature explanations and examples
- Customize cell appearance
Cell renderers change how data is displayed. Use them for status badges, links, and action buttons while retaining the original values for sorting and filtering.