Clickable Icons

Hi - I would like to have a clickable icon, but not sure how to achieve it. I have an icon displayed in a Text field, but there is no Event Handler that I can see. I have tried using a Button, but I don't think that I can display HTML in order to render the Icon.

Can anyone suggest a solution please..?

Thanks
Adam

You can add an image of the icon via the Image component which lets you define a query to be run on click.

Screenshot 2021-07-05 at 22.34.40

Would that work for you?

2 Likes

Many thanks. That is the solution I have in place at the moment, which works fine. It's just a bit of a pain hosting the images and would be slightly easier to use icons. Maybe something for the future.

Thanks. Adam

Retool can host the images for you (see the BASIC tab). But agree, maybe a Media Library feature comes in handy for apps that have many visual assets.

Many thanks John - I wasn't aware that retool can host images. Where would I find the BASIC tab that you refer to please...?

Thanks

Adam

No worries mate, here you go

d99ba7460c64f22036315092c17dd252966d628a

Hmmm, I don't have the option of Image File. I wonder if a recent rolling update took it away or added it.

image

1 Like

Huh, you're right. Sorry for the "fake news".. Well kinda.

Retool does have that functionality, but only in the On-prem version (as far as I can understand). I don't see the upload button on retool.com as well.

That makes sense that it is onprem - Retool does not want to host images I am sure.

1 Like

That's exactly what they said :stuck_out_tongue: