Genie Discord forum

I want to display data from a DataFrame in a DataTable. I looked at the Iris example app and it seems like I'm doing things correctly but I'm not getting any data being displayed.
include("overshoot.jl")
using GenieFramework using Dates using DataFrames using .Overshoot @genietools
function filter_df()
df = create_df()
df = DataFrames.select(df,
return df
end
@app begin @in consumption_date = today()
@out consumed_on = string(calculate_used_date(today()))
@out consuming = string(calculate_using_date(today()))
@in day_weights = PlotData[PlotData(x = create_df().year, y = create_df().rounded_weight)]
@in overshoot_days = PlotData(x = create_df().year, y = create_df().rounded_overshoot_days)
@in cumulative_overshoot_days = PlotData(x = create_df().year, y = create_df().rounded_cumulative_overshoot_days)
@in data = DataTable(filter_df())
@onchange consumption_date begin
# consumed_on = string(calculate_used_date(consumption_date))
# consuming = string(calculate_using_date(consumption_date))
end
end
@page("/", "app.jl.html") end

The Julia code looks fine, excet that data
perhaps should be @in
. Can you share the HTML for the table component too? Here's a MWE with a table if it helps
https://learn.geniecloud.io/docs/reactive-ui/components/table

This is the HTML:

Could it be because I did not define columns? I assumed it would extract the column names from the DataFrame.

Changed it to this:

Also renamed data to table ๐

๐คฆโโ๏ธ ouch yea, we have a patch ready to fix this HTML tag. The columns parameter is not needed, but if you don't have it the columns will be in random order. also, as you already saw, you need to use the .data field in the DataTable object

Thanks! Starting to get the hang of it ๐