属性'dateComponentFramework'在类型"网格选项"上不存在



我试图在使用AG网格版本27.2.1时使用Angular 13中的一些代码,我试图为我的网格分配一些日期选项。在Gris 25.01中,这仍然是GridOptions下的一个选项。这被什么取代了,我怎么让它工作在27。又是X ?

import {Component, Input, OnDestroy, OnInit, ViewEncapsulation} from '@angular/core';
import {GridOptions} from 'ag-grid-community';
import {DateComponent} from '../date-component/date.component';
import {HeaderComponent} from '../header-component/header.component';
import {ApiService} from '../../../../services/api/api.service';
import {takeWhile} from 'rxjs/operators';
@Component({
selector: 'app-rich-grid',
templateUrl: 'rich-grid.component.html',
styleUrls: ['rich-grid.css'],
encapsulation: ViewEncapsulation.None
})
export class RichGridComponent implements OnInit, OnDestroy {
private gridOptions: GridOptions;
public showGrid: boolean;
public rowData: any[];
public rowCount: string;
@Input() title: string;
@Input() columnDefs: any[];
@Input() rowSelection = 'multiple';
@Input() rowModelType = 'infinite';
@Input() paginationPageSize = 100;
@Input() cacheOverflowSize = 2;
@Input() maxConcurrentDatasourceRequests = 2;
@Input() infiniteInitialRowCount = 1;
@Input() maxBlocksInCache = 2;
@Input() getRowNodeId: Function;
@Input() dataUrl: string;
private alive = true;
constructor(private api: ApiService) {
// we pass an empty gridOptions in, so we can grab the api out
this.gridOptions = <GridOptions>{};
this.showGrid = true;
this.gridOptions.dateComponentFramework = DateComponent;
this.gridOptions.defaultColDef = {
resizable: true,
sortable: true,
filter: true,
headerComponentFramework: <new() => HeaderComponent>HeaderComponent,
headerComponentParams: {
menuIcon: 'fa-bars'
}
};
}
ngOnInit(): void {
//
}

我认为它应该注册在组件网格属性

components: {
agDateInput: DateComponent,
}

查看此链接:Ag-grid Date组件

最新更新