Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template with icon: possible to change image url dynamically? #463

Open
baden32 opened this issue Jan 21, 2022 · 0 comments
Open

Template with icon: possible to change image url dynamically? #463

baden32 opened this issue Jan 21, 2022 · 0 comments

Comments

@baden32
Copy link

baden32 commented Jan 21, 2022

The json received with data (not develepped on my side) contains field "type" with a numeric value (1, 3,4, etc.).
This info represent a category and I would like to use template iconLeft in order add an icon according to this value.

In my Easycomplete options, I set this:

template: {
type: "iconLeft",
fields: {
iconSrc: "type"
}
},

As type is only containg a numeric value, no image can be displayed.

So is there a way to dynamically change the received value (in. 2) into a valid image url (ie. /files/images/2.png) ?

Thanks a lot for your help.
Joe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant