Skip to content

Display table works for nicegui<=1.4.37, but not for nicegui>=2.0 #4297

Closed Answered by falkoschindler
nghia-vo asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @nghia-vo,

In NiceGUI 1.x ui.table didn't expect columns=None or rows=None. So your code relied on undefined behavior. And while 2.0 added support for columns=None, rows=None is still invalid. Instead you should use empty lists:

table = ui.table(columns=[], rows=[], row_key="Index")

Later you can update them like this:

table.rows[:] = rows
table.columns[:] = columns
table.update()

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nghia-vo
Comment options

Answer selected by nghia-vo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants