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

[SelectingItemsControl] TextSearch in all items, not only realized items #12490

Open
dbriard opened this issue Aug 9, 2023 · 5 comments · May be fixed by #17506
Open

[SelectingItemsControl] TextSearch in all items, not only realized items #12490

dbriard opened this issue Aug 9, 2023 · 5 comments · May be fixed by #17506

Comments

@dbriard
Copy link
Contributor

dbriard commented Aug 9, 2023

It is a bit strange to me that the ComboBox and SelectingItemsControl only search in realized items, why not to search in all items?

Use case is Font ComboBox with 1000+ Google Fonts.

Quick solution:
image

  • Could also be an interface to implement by the items to return the TextSearch's Text instead of ToString().
  • Or an event in ComboBox to implement to select the desired item according to search term.
    I am not sure what is the best way.

As EditableComboBox do not exists in Avalonia, that improvement would be appreciated as a workaround. Thank you.

@timunie
Copy link
Contributor

timunie commented Aug 10, 2023

Iirc in WPF there is TextSearchPath which we may want to port to Avalonia. https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.textsearch?view=windowsdesktop-7.0

@ElliotEserinUT
Copy link

Sorry, if I wanted to implement this quick solution, is there an easy way to do it? inheriting from combo box or something or would I have to fork the repo and change the SelectingItemsControl?

@jonko0493
Copy link

jonko0493 commented Nov 12, 2024

@ElliotEserinUT perhaps a little late to the party, but there is a workaround to do this for now. I've implemented it in this PR: https://github.com/haroohie-club/SerialLoops/pull/419/files#diff-3cbf4d5441529ea6762800fb2e7b1bcc8460f093147edadfca4cf8931e3e05e6R26-R30

@ElliotEserinUT
Copy link

@ElliotEserinUT perhaps a little late to the party, but there is a workaround to do this for now. I've implemented it in this PR: https://github.com/haroohie-club/SerialLoops/pull/419/files#diff-3cbf4d5441529ea6762800fb2e7b1bcc8460f093147edadfca4cf8931e3e05e6R26-R30

That's great, thank you 😁 I did end up figuring out how to override the base function to make it work, but it definitely needs fixing and I'm sure I'll need this again so it's greatly appreciated!

@jonko0493
Copy link

@ElliotEserinUT just realized that my solution does not actually fix this issue, so I filed #17506 to implement it properly!

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