akveo / akveo/ng2-smart-table

async image in valuePrepareFunction

Abierto
#1,242 1 comentario 1 reacción 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

Hi,
this i my scenario:
I have a column with image that is get by API.
I load image by async method called in valuePrepareFunction
This doesn't work.
Is this allowed by plugin/valuePrepareFunction ?
Thanks
Alessio
```
coverImage: {
title: 'Logo',
type: 'html',
valuePrepareFunction: async (coverImage) => {
let val = this.getItemImagev2(coverImage).then(
(val) => {
console.log('res ' , val);
return ``;
},
(err) => {
console.log('res err ' , err);
let imageSrc="https://www.ieengsolution.it/wp-content/uploads/2015/08/logo_small.png";
return ``;
}
);
},
filter: false
},
```
![Immagine 2021-01-06 103137](https://user-images.githubusercontent.com/10115778/103752851-853a0800-500a-11eb-9372-5baae9f8d102.png)

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.