Const
Collection of value parsers for AG Grid
Parses a string value to a number
Parsed number or null if invalid
const value = AGGridUtils.parsers.number({ newValue: '123.45' });
// Returns: 123.45
Object containing the new value to parse
Trims a string value
Trimmed string or null if empty
const value = AGGridUtils.parsers.string({ newValue: ' hello ' });
// Returns: 'hello'
Object containing the new value to trim
Collection of value setters for AG Grid
Creates a setter that rounds numbers up to the nearest integer
A value setter function
const setter = AGGridUtils.setters.numberCeil('price');
setter({ data: {}, newValue: 123.45 });
// Sets data.price to 124
The field name to set the value on
Creates a setter that rounds numbers down to the nearest integer
A value setter function
const setter = AGGridUtils.setters.numberFloor('price');
setter({ data: {}, newValue: 123.45 });
// Sets data.price to 123
The field name to set the value on
Creates a setter that formats numbers to one decimal place if they're integers
A value setter function
const setter = AGGridUtils.setters.numberFloat('price');
setter({ data: {}, newValue: 123 });
// Sets data.price to '123.0'
The field name to set the value on
Collection of utility functions for AG Grid integration