Skip to content

How to extract value when using element #32

@qingant

Description

@qingant
with ui.element('div', className='w-full flex flex-row justify-between items-center', key='container') as div:
  print('DIV', div)
  a = ui.element('tabs', options=['All', 'Running', 'Ended'], default_value='All', className='mr-2', key='status_tabs')
  b = ui.element('tabs', options=['All', 'Winning', 'Losing'], default_value='All', className='mr-2', key='result_tabs')
  c = ui.element('div', className='flex-grow w-full')
  d = ui.element('input', placeholder='Search Experiment', className='border-none w-[50px] p-2 searchInput', key='search')

print(div,  div.state, div.key, div.children[0].key, d.state, d.value)

I have a piece of code like this, but unfortunately the value is actually populated to div.state. how could I get value of each element ? or at least have a way to figure out which element the value comes from ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions