akveo / akveo/ng2-smart-table

rowData not available in onComponentInitFunction

Abierto
#941 2 comentarios 3 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
1.6k
Forks
867
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

In the onComponentInitFunction the rowData property is not available. There is a way to make it available or is a new feature?

A solution can be:

replace in file https://github.com/akveo/ng2-smart-table/blob/master/src/ng2-smart-table/components/cell/cell-view-mode/custom-view.component.ts#L50 replace

onComponentInitFunction && onComponentInitFunction(this.customComponent.instance);

with

onComponentInitFunction && onComponentInitFunction(this.customComponent.instance, this.getPatch());

and then use as

...
onComponentInitFunction: (instance, rowData) => {
console.log(rowData);
}
...

OR call `this.patchInstance()` **before** calling `this.callOnComponentInit()`

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.