My auto group column with a keyCreator, is treating values and cell renderers differently than the regular column for that item
When using a column definition like so:
{
field: 'gold',
rowGroup: true,
cellRenderer: 'agGroupCellRenderer',
keyCreator: (params) => {
return 'Test';
},
cellRendererParams: {
innerRenderer: function(params) {
return params.value;
}
}
}
You will have two columns for this definition showing, an auto group column (as there is rowGroup and agGroupCellRenderer), and the standard column.
You may notice that the innerRenderer will apply to both of these columns, but it will pick up different values. (keyCreator value in the group column, and the standard params.value in the regular column).
The reason for this is that the keyCreator will pass its value to only the grouped column.
Applying a valueGetter to this columnDef will apply to both the grouped and ungrouped column. However the value passed by it can be overriden by the keyCreator value.
If you want to prevent the innerRenderer from applying to both, you can specify a separate one in your autoGroupColumnDef.
Comments
0 comments
Please sign in to leave a comment.