I am having issues using the ColumnDataGetterSetterFunction
to get/set data for some column.
In the source code I see that data
in ColumnSettings
can be of type ColumnDataGetterSetterFunction
.
export interface ColumnSettings extends Omit<GridSettings, "data"> {
data?: string | number | ColumnDataGetterSetterFunction;
/**
* Column and cell meta data is extensible, developers can add any properties they want.
*/
[key: string]: any;
}
The interface definition I see is
export interface ColumnDataGetterSetterFunction {
(row: RowObject | CellValue[]): CellValue;
(row: RowObject | CellValue[], value: CellValue): void;
}
My understanding is that this ?function/not sure what? that implements this interface would be responsible to get/set data for the cells in the column.
To be honest I cannot fully grasp this interface and cannot really find any explanation in the Typescript documentation how such interfaces work, that define two anonymous signatures.
My question is how this interface should be used correctly?
I tried to make it work in this Stackblitz but the column for which I return such a function simply is not shown.
Stackblitz