Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Is there an example available on how to add search box to a StippleUI.table? For example, like the search functionalities shown in the Quasar docs: https://quasar.dev/vue-components/table/#example--grid-style
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
When you find some code in the Quasar docs that you want to try, you can use the parse_vue_html
function to get the equivalent Julia code. In this case it didn't work at first, I had to put the template
in between []
. Here's the table with search:
@out data = DataTable(DataFrame(
name=["Frozen Yogurt", "Ice cream sandwich", "Eclair", "Cupcake", "Gingerbread", "Jelly bean", "Lollipop", "Honeycomb", "Donut", "KitKat"],
calories=[159, 237, 262, 305, 356, 375, 392, 408, 452, 518],
fat=[6.0, 9.0, 16.0, 3.7, 16.0, 0.0, 0.2, 3.2, 25.0, 26.0],
carbs=[24, 37, 23, 67, 49, 94, 98, 87, 51, 65]
))
@in dfilter = ""
#####
table(:data, (columns!)="data.columns", flat=true, bordered=true, grid=true, title="Treats", var"row-key"="name", filter=:dfilter, hideheader="",
template(var"v-slot:top-right"="",
textfield("", :dfilter, borderless="", dense="", debounce="300", placeholder="Search", [
template(var"v-slot:append"=true,
icon("search")
)
]
)
)
)
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
It works!!! Amazing, I didn't thought the template components were supported at all. The parse_vue_html
is more powerful than expected, a great feature, thank you!