how to update dropdown Selection options dynamically ? #324
-
Hello, I want to update a dropdown Selection options after the user click on a button with a new list of options but I'm struggling to do this, any ideas ? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
falkoschindler
Jan 31, 2023
Replies: 1 comment 4 replies
-
As mentioned here, you can simply manipulate the options of a select = ui.select(['A', 'B', 'C'])
def add_option():
select.options.append('D')
select.update()
ui.button('Add option', on_click=add_option) |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
morningstarsabrina
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As mentioned here, you can simply manipulate the options of a
ui.select
and call update afterwards: