某些行中的 ag-grid 隐藏复选框取决于单元格值

ag-grid hide checkbox in some rows depend on the cell value

目前我正在使用 ag-grid 来实现我的 table 但我遇到了一个问题。 我只想在同一行而不是所有行中显示复选框。我可以知道怎么做吗?

来自 docs 列属性:

checkboxSelection - Boolean or Function. Set to true (or return true from function) to render a selection checkbox in the column.

这是一个 plunker 示例,其中为名字以大于 'M'

的字母开头的人设置了一个复选框

相关代码可见app/rich-grid.component.ts:

headerName: "Name",
field: "name",
checkboxSelection: params=>params.data.name[0] >'M'