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
Fixes to the .key_up()
method to make it usable for a dynamic dropdown autocomplete
#7425
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/cc8bf9e1d4502c3bd36baf226b868f1574c37e3e/gradio-4.19.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@cc8bf9e1d4502c3bd36baf226b868f1574c37e3e#subdirectory=client/python" |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
Isn't this a breaking change? |
Both of the changes are technically breaking changes but the original changes were both made in 4.19.0 (the first one was changed in 4.19.0 and the KeyUp event was introduced in 4.19.0) so I think its ok but I should mark it as such |
I wouldnt list them as breaking changes if we aren't doing a major bump :p that's just confusing. I'd just put it through as a fix. |
The python test is failing due to a typecheck issue on files that I haven't touched, something strange is happening on CI. Will investigate but that should be independent of this PR |
Nice @abidlabs, works great! |
Thanks @hannahblair for reviewing! Merging in changes from |
This PR makes two changes:
The way I've implemented it here is that iff when
allow_custom_value=True
, the Dropdown's values are not reset, which I think is the desired behavior for users in either case. I've also added a test for this..key_up()
is an event that is expected to be fired continuously, I've set the defaulttrigger_mode
for the.key_up()
event to bealways_last
, just like for.change()
.Test the new behavior with this demo:
cc @apolinario (see internal thread)