【问题标题】:ag-grid angular 2 header templateag-grid angular 2 标题模板
【发布时间】:2017-01-12 06:56:47
【问题描述】:

我将 ag-grid 包装在一个 ng2 组件中。

我希望第一个标题是具有父功能的复选框。

如何从容器组件中做到这一点?

ag-grid.component

@Component({
  moduleId: module.id,
  selector: 'rg-grid',
  templateUrl: 'grid-control.component.html',
  directives: [AgGridNg2]
})

export class RgGridComponent {

  private gridOptions: GridOptions;
  private showGrid: boolean;

  @Input() rowData: any[];
  @Input() columnDefs: AbstractColDef[];
}

容器组件

@Component({
    moduleId: module.id,
    selector: 'alerts-table',
    templateUrl: 'alertsTable.component.html',
    directives: [RgGridComponent]
})

export class AlertsTableComponent implements OnInit {
    selectedAlert: IAlert;
    users: User[];
    checkedAlerts : IAlert[];
    displayDialog : boolean;
    dialogContent : string;
    columns : ColDef[];

    constructor(private _alertsService: AlertsService, private _usersService: UsersService) {
        this.displayDialog = false;
        this.investigationRequest = new EventEmitter<number>();
        this.columns = [ ??? ] 
        this.checkedAlerts = new Array<Alert>();
    }

【问题讨论】:

    标签: angular ag-grid


    【解决方案1】:

    ag-Grid 不支持标题中的 Angular 2 组件。这是我们现在正在做的事情,希望能在三周后发布。它可能是 v8.0.0(我们将在本周推出 v7.2.0,然后下一个主要版本将有新的标题)。

    【讨论】:

    • 谢谢 Niall,你是最棒的!
    猜你喜欢
    • 2018-10-26
    • 1970-01-01
    • 2016-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多