Skip to content

AfterCellRenderContext

Context passed to the afterCellRender plugin hook.

This provides efficient cell-level access without requiring DOM queries. Plugins receive this context for each cell as it’s rendered, enabling targeted modifications instead of post-render DOM traversal.

afterCellRender(context: AfterCellRenderContext): void {
if (this.isSelected(context.rowIndex, context.colIndex)) {
context.cellElement.classList.add('selected');
}
}
PropertyTypeDescription
rowTRowThe row data object
rowIndexnumberZero-based row index in the visible rows array
columnColumnConfig<TRow>The column configuration
colIndexnumberZero-based column index in the visible columns array
valueunknownThe cell value (row[column.field])
cellElementHTMLElementThe cell DOM element - can be modified by the plugin
rowElementHTMLElementThe row DOM element - for context, prefer using cellElement
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt