【发布时间】:2019-09-20 04:23:35
【问题描述】:
我已经设置了一个简单的列定义:
{
headerName: "Probabilité",
headerToolName: "Consultez les échelles",
field: "pbt",
editable: true,
cellRenderer: params => {
return `
<hr>
<select class="form-control" (change)="UpdateRisqueBrut($event.target);"
>
<br>
<option>1- Très improbable</option>
<option>2- Peu probable</option>
<option>3- Possible</option>
<option>4- Probable</option>
</select>
<hr>
`;
}
}
以这种方式呈现:
您可能已经注意到,我在自定义单元格渲染中设置了一个侦听器,称为记录在打字稿列表中选择的选项。
更新RisqueBrut
这是监听器的定义:
public UpdateRisqueBrut(risque) {
console.log(risque.value);
}
选择该选项后,我没有收到任何错误,但控制台中没有任何显示。
我做错什么了吗?
【问题讨论】:
标签: ag-grid ag-grid-ng2 ag-grid-angular