DataTable columns dynamic update

Hello,

I created a datatable with no columns initially.
I am updating the columns by clicking on a dropdown.
It’s working at the first click but not the next ones.

This is the line in question:

user_defined_table.columns = [
TableColumn(field=item, title=item)
for item in items
]

Also I am updating the CDS like this:

empty_row_data = {key: [0] for key in items}
user_defined_source.data = empty_row_data

Any idea ?
Thanks

None at all. Generally, in order to be able to help, we need a complete Minimal Reproducible Example so that the problem can be debugged directly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.