shlomiassaf/ngrid

Transformation function is not receiving a valid value to transform

jean-merelis opened this issue · 2 comments

What is the expected behavior?

The function should receive the value in the first argument

What is the current behavior?

The function is receiving undefined value in the first argument

What are the steps to reproduce?

https://stackblitz.com/edit/pebula-ngrid-starter-m9i6cp?file=app/app.component.ts

Which versions of Angular, CDK, Material, NGrid, OS, TypeScript, browsers are affected?

Angular 11
NGrid 3.0.0

I think "this" should be "col" in this function

export function getValue<T = any>(col: PblColumnDefinition, row: any): T {
if (col.transform) {
return col.transform(deepPathGet(row, this), row, this);
}
return deepPathGet(row, col);
}

Released in 3.0.1, thank you