Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Is there a functionnality allowing the display of icons within a Stipple / Quasar tables?
For example an initial take was to write the actual html for q-icon within a DataFrame column:
df.icon .= """<q-icon name="warning" color="warning" size="1rem"/>"""
The rendering however results in the raw string as shown in attached image. Is there a way to request string to be parsed as html? Or other trick to populate a Stipple Table cells with icons?
![](https://cdn.discordapp.com/attachments/1153468692085088358/1153468692332548096/image.png?ex=6540386e&is=652dc36e&hm=7b0182b7330f5fb639c4dc7faa9b7814280daa85572b6450d26fdae328d1c5bb&)
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
We're not sure about this one, we'd need to see what's possible with pure Quasar and how it is done. Perhaps we'd need to use Quasar slots
https://dev.to/quasar/quasar-s-qtable-the-ultimate-component-4-6-all-the-slots-40g2
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
I looked at a more manual generation with @recur
but without luck so far.
Assuming the following vector of icon names in the model
:
icons3::R{Vector{String}} = ["check_box", "warning", "error"]
Is it expected that none of the 2 follwoing approches work (the page only renders "null")?:
StippleUI.icon("{{ item }}", @recur(:"item in icons3"))
p(StippleUI.icon("{{ item }}"), @recur(:"item in icons3"))
However, the 2 following work fine:
3. [icon(_icon, color="red") for _icon in model.icons3[]]
4. ["""<q-icon name=$(icon)></q-icon>""" for icon in model.icons3[]]
It's possible to get a workaround with 3 & 4, but wondered if 1 and 2 not rendering might be a bug?
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
The issue is with the use of the null syntax, which doesn't work anymore
This code should work:
using GenieFramework
@app begin
@out icons3 = ["check_box", "warning", "error"]
end
ui() = StippleUI.icon(:item, @recur(:"item in icons3"))
@page("/", ui)
![](https://cdn.discordapp.com/attachments/1153468692085088358/1156244747447455815/image.png?ex=65411755&is=652ea255&hm=b5432d2b122ea11da33080e769cc26e416f1e655c28eabfa65c06c92c19d6555&)
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
This works like a charm!
I didn't suspected the "null" to be the issue as the following resulted in valid output:
span("{{_icon}}", @recur(:"_icon in icons3"))
Thank you so much for the help, very appreciated!