I'm able to apply color or make the column heading text bold, but I can't center align the text for some reason.
<lightning:datatable data="{! v.data }"
columns="{! v.columns }"
keyField="id"
resizeColumnDisabled="true"
hideCheckboxColumn="true"/>
.THIS table thead th {
color: red;
font-weight:bold;
}
Putting text-align: center
in the css doesn't seem to have any effect on the column text. Even directly altering the div surrounding the lightning:datatable with a style tag doesn't work.
Any help would be great.
lightning:datatable
in adiv
and giving thediv
a class:slds-align_absolute-center
– Sarang Dec 11 '18 at 12:55