akveo / akveo/ng2-smart-table

async image in valuePrepareFunction

Open
#1,242 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
867
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.