我有一个可编辑的农业网格。如何将占位符添加到空单元格(编辑单元格时它们应该消失)?
cellEditor: 'agTextCellEditor',
cellEditorParams: (params) => {
debugger;
const { filterOptionKey, placeholder } = params;
return `Enter the Athelte`;
},
filter: 'agNumberColumnFilter',
filterParams: {
filterPlaceholder: 'Enter the Athelte '
}
}, 我们尝试了上面的代码,但它不起作用
valueFormatter
来这样做!
{
headerName: 'Text Editor',
field: 'color1',
valueFormatter: (params) => params.value || 'Click to edit!',
cellEditor: 'agTextCellEditor',
cellEditorParams: {
maxLength: 20,
},
},