【发布时间】:2020-11-26 20:02:22
【问题描述】:
使用这个reference,我工作过 ag grid 下拉菜单。
问题:一旦我选择了一个下拉值,getvalue() 就会返回值而不是名称。因此它显示列上的数字,它应该是文本。
如果我将其更改为 name,则在保存时,它会绑定到 name 。但这里应该是值。
必需:getValue 应返回名称,保存数组应包含值。
agInit(params: any): void {
this.params = params;
this.value = this.params.value;
this.name = this.params.name;
this.options = params.options;
}
getValue(): any {
return this.value;
}
ngAfterViewInit() {
window.setTimeout(() => {
this.input.element.nativeElement.focus();
})
}
stackbltiz 在这里 here
我怎样才能做到这一点。
【问题讨论】:
-
嗨@user630209 你找到解决方案了吗?我也面临同样的问题。
标签: angular8 ag-grid ag-grid-angular