-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow free input in AutoComplete #107
feat: allow free input in AutoComplete #107
Conversation
60b6c42
to
3525b3c
Compare
@luoxiaozero any comments? I've also added "allow_free_input" as an option. So basically by default it almost work as a previous version. Probably the main difference is that the first option doesn't get selected by default and also options update clears up selection (the current component behaves confusingly in this respect in my opinion) |
I think when allow_free_input is false, the previous behavior can be maintained (as long as the option is not empty, then select_option_index cannot be None) |
What about dropping its value to 1 when options change? That could be done behind a different option if you wish. |
When the option changes, allow_free_input is 1 if it is false and None if it is true. |
Yes, like that, thanks |
0ad47e8
to
8298fa0
Compare
I've also switched the option to just a boolean, not a signal. The source motivation was compile error about NotRawCallback but in principle it makes very little sense to make this option reactive. |
Can you improve the documentation for the newly added fields? (demo_markdown/docs/auto_complete/mod.md) |
8298fa0
to
57a529b
Compare
Should be done now |
Thanks! |
Hi @luoxiaozero here is my monkey-patched version of AutoComplete - I needed to support free input and not only selection from
options
.Maybe this could be made into an option of
AutoComplete
, what do you think?