[Grid] CSS Styling of grid cells
- Dominant language
- TypeScript
- Stars
- 92
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
**Enhancement**
Currently it is not possible to style the container of a grid cell.
I have a custom cell renderer for a certain column, which works fine, but I'd like to center the value in the cell, because I basically show a fontawesome image, which I'd like to have centered rather than aligned left.
Package Version:Dojo 5
**Code**
This is part of my ColumnConfig:
```
renderer: (props: { value: string }) => {
return v(
'span',
{
classes: [props.value == 'male' ? 'fas fa-male' : 'fas fa-female', css.gender]
},
[]
);
}
```
The rendered span itself cannot tell this parent to align it centered and I do not have any chance to tell the cell div container to center its contents.
**Expected behavior:**
A _classes_ or _extraclasses_ property in the column config for the gender column would help a lot.
**Actual behavior:**
There is no opportunity to apply a certain CSS style for the cell container div.
Contributor guide
Assessment
This issue has not been assessed yet.