ImageViewerProvider
Description
An ImageViewerProvider is a class implementing a ViewerProvider to display images when specific conditions are met.
Functions
|
Method |
Argument(s) |
Output |
Description |
|---|---|---|---|
|
constructor |
imageConditions |
void |
Calling this constructor with an array of |
Default Viewer
Currently, the DataGrid provides a default ImageViewerProvider for boolean values (<image>). The image can be overridden by providing a boolean ViewerDefinition using the ImageViewerProvider class.
Example
const viewerDefinitions = {
"boolean": {
factory: (context: ViewerContext) => new ImageViewerProvider([
{
url: "someBooleanImage.png",
condition: (context: ViewerContext) => context.value
}
])
};
The viewerDefinitions must then be provided to the DataGrid through the DataGridOptions.
Need help? Contact us!