Can i pass a custom parameter to ag-grid valueFormatter function like valueFormatter: percentageFormatter(params, '10')
If yes then what needs to be passed as first parameter to get the cell value?
Function
percentageFormatter(percentage: number) {
return (params) => {
//your code goes here
//**EDIT** this return will be what you will see in ag-grid
return params.value * percentage;
}
}
Then, in your column definition:
valueFormatter: percentageFormatter(10)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With