Replies: 1 comment
-
You tried updating options rather than setting all at once? Ref: https://nicegui.io/documentation/select#update_options Use
You could also use the filter on event but I think it will require JS code to handle filters. I don't know how to use virtual scroll, though i believe it may require JS as well. Above is prolly the most Pythonic way to achieve what you want. |
Beta Was this translation helpful? Give feedback.
0 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.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Example Code
Description
I am building a search widget for my application that uses keywords to then build a query to retrieve the results. I I like the idea of
ui.input_chips
and wanted to use that at first (SearchUI.add_search_bar_as_chips
).Since I have an index anyway I thought that it's very useful for my users to have an autocomplete function. I replicated the look of
ui.input_chips
with the according props to makeui.select
behave similar.The issue I run into:
My selection of possible keywords is very large. It both makes the website slow using a large list but I also dislike having a very large dropdown menu. I was looking for props to adjust the size of the dropdown and was looking at the
virtual-scroll
props but it seems like I was misunderstanding them.The quasar select documentation shows an example of a behaviour I am looking for at
Filtering and autocomplete -> Filtering on more than 2 chars
. Is there a way to achieve something similar to that to reduce the length of listed items in theui.select
dropdown?Do you have another suggestions to create something similar with other elements? I am considering adapting NiceGUI's search.py.
NiceGUI Version
3.0.3
Python Version
3.12.10
Browser
Chrome
Operating System
Windows
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions