Skip to content
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

Combo box filtering does not work #467

Closed
GammaSagittarii opened this issue Apr 6, 2024 · 3 comments
Closed

Combo box filtering does not work #467

GammaSagittarii opened this issue Apr 6, 2024 · 3 comments

Comments

@GammaSagittarii
Copy link

Hi, the combobox in demo in the widget gallery example does not filter the options list as I think is intended.
It looks like this:
current_gallery

After changing https://github.com/vizia/vizia/blob/main/crates/vizia_core/src/views/combobox.rs#L199
to self.filter_text.clone_from(text);
it works as expected.

after_change

geom3trik added a commit that referenced this issue Apr 6, 2024
@geom3trik
Copy link
Collaborator

Thank you for the detailed report and fix :)

@GammaSagittarii
Copy link
Author

GammaSagittarii commented Apr 6, 2024 via email

@geom3trik
Copy link
Collaborator

geom3trik commented Apr 6, 2024

P.S. I thought that the line self.placeholder.clone_from(text); is not
necessary as the filter is being set while the combo is being edited -
which means that it is not showing the placeholder.
If the option is changed it sets the placeholder on change so it gets
updated anyway, and if option is not changed and editing is abandoned it
reverts to the previously selected option and also sets the placeholder.

Ah yes good spot. It seems that placeholder should have been filter_text all along. Will clean that up at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants