Ag-Grid标头对齐中心不起作用-角度9

问题描述 投票:0回答:1

我正在使用Angular 9并安装了软件包ag-grid-angularag-grid-community

我想对齐:将表格标题居中。 Please refer this image

我推荐了these stackoverflow answers,但它对我不起作用。

javascript angular typescript ag-grid ag-grid-angular
1个回答
0
投票

Referring to override ag-grid styles

您需要使用此部分:

  styles:[`
      .ag-header-group-cell-label { justify-content: center; }
      .ag-header-cell-label { justify-content: center; }
  `],

ag-header-group-cell-label-用于分组的标题

[ag-header-cell-label-用于普通标题

Demo

© www.soinside.com 2019 - 2024. All rights reserved.