Replies: 2 comments 4 replies
-
Like this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
No, the behavior of Select component is almost fine. It displays a dropdown list, it has search as I type, the only thing that I need is line wrapping, so that if the selected option is really long, its text would wrap to the next line instead of scrolling out of view. If I do myopts = {1: 'aaaaa', 2: 'aaaaaaaaaaaaaaaa', 3: 'aaaaaaa aaaaa aaaaaaaa aaaaaaa aaaaaaa aaaaaaaaaa'}
myselect = ui.select(myopts, value=1, new_value_mode='add-unique', on_change=lambda e: ui.notify(f'select value: {e.value}'))
with myselect.default_slot:
ui.textarea('textarea').bind_value_from(myselect, backward=lambda v: myopts[v]).props('dense')
myselect2 = ui.select(myopts, value=1, new_value_mode='add-unique', on_change=lambda e: ui.notify(e.value)).bind_value(myselect) the textarea is displayed next to the original input control. I would like to replace it instead. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Hello,
I would like to display a multiline select control. By default its contents is single line. Basically I would like to replace the inner input control with a textarea. Is it doable? I found nothing in the NiceGUI and Quasar docs so far.
Beta Was this translation helpful? Give feedback.
All reactions