custom rendered that renders html content
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 867
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
I want to know why there is no possibility to define a type:'html' on a column with a customRenderer.
In fact I made a quite simple renderer :
```
import { Component, Input, OnInit } from '@angular/core';
@Component({
template: `
{{renderValue}}
`,
})
export class booleanRendererComponent implements OnInit {
renderValue: string;
@Input() value: boolean;
@Input() rowData: any;
ngOnInit() {
this.renderValue = '
if (this.value == false){
this.renderValue = '';
}
}
}
```
which I would like to call like this ( the commented line :
```
my_boolean: {
title: 'My Boolean',
type: 'html',
//renderComponent: booleanRendererComponent
valuePrepareFunction: (value) => { return value == true ? '
```
I am not blocked as I used valuePrepareFunction which does the job, but I think it will be clearer if we do it directly in my renderer.
Thanks
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。