Configuring Notes
Summary
- Developers can configure which Cells in the Grid are able to receive Notes
- Additionally, they can override the CSS to theme Notes to match bespoke requirements
Notable Cells
By default all cells in AG Grid - even readonly ones - can receive a Note.
But developers are able to use the isCellNotable property in Note Options to specify on a cell by cell basis whether or not a Note can be added.
Configuring Notable Cells
- This example contains an implementation for the
isCellNotableproperty in Note Options which prevents Notes from being added to Cells:- in the
LanguageColumn - in Rows where the value in the
LicenseColumn is "Other"
- in the
Expand to see the function implementation
Theming Notes
Like everything in AdapTable, Notes can be custom themed using CSS Variables.
A common use case is changing the colour of the triangle in a cell denoting a Note (from the default of blue).
Note
Technically AdapTable uses the value of the --ab-color-accent variable, which itself can be overridden
All that is required is to provide a different value for the --ab-CellNote-triangle-color CSS variable.
Notes CSS
- In this demo we have overridden 3 CSS Variables so that
- the triangle in a Notes cell is yellow
- the Notes popup is a light yellow background with black font