GenieFramework / GenieFramework/StippleUI.jl

Dynamic setting of Table columns property gives empty component

Open
#145 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
90
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Hi am attempting to limit the overall width of a Table and the width of the columns in the table. For the column widths, I created a dictionary for the DataTable columns in the @app block of the code and used @out for the variable to link to the Columns property in the no-code editor UI.

```
# Why doesn't this work?
search_dict =
map(col_attr -> Dict(
":name" => col_attr[1],
":label" => col_attr[1],
":classes" => col_attr[2]
)
,[["Column1","col-1"],["Column2","col-1"],["Column3","col-4"],["Column4","col-4"],["Column5","col-2"]]
) # Only show these columns
@out search_dict_columns = [join(["$k = \"$(v)\"" for (k, v) in d], " ") for d in search_dict ]
```

However, when using this the table does not display the data when its data variable is updated. I can use
```
@out search_dict_columns = ["Column1","Column2","Column3","Column4","Column5"]
```
However, this does not limit the width of the columns and causes the columns to extend beyond the "div" section it is in. This overlaps the next section and makes the UI unworkable.

How do you set the column widths for a Table component?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Table component's Columns property and compare the working static list with the dynamically generated search_dict_columns value. Reproduce the issue using the provided @app and @out snippets; done means the table displays updated data and the configured column widths stay within its containing div.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.