Skip to content

How do you update a ui.table cells with new value without recreating the table #1897

Answered by mturoci
fuithecat asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @fuithecat,

tables currently do not support data buffers (likely will in the future), but you may update table rows via table rows prop:

from h2o_wave import Q, ui, main, app


@app('/')
async def serve(q: Q):
    if not q.client.initialized:
        q.page['example'] = ui.form_card(box='1 1 5 5', items=[
            ui.table(
                name='table',
                columns=[
                    ui.table_column(name='first_name', label='First Name', align='center'),
                    ui.table_column(name='last_name', label='Last Name', align='right'),
                ],
                rows=[
                    ui.table_row(name='row1', cells=['John', 'Doe']),
                …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by fuithecat
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mturoci
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants