Open jonko0493 opened 1 week ago
You can test this PR using the following package version. 11.3.999-cibuild0053300-alpha
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
@cla-avalonia agree
Everything was passing prior to me merging master... not sure what changed, could be transient failures?
@jonko0493 don't worry tests are a bit flaky atm
You can test this PR using the following package version. 11.3.999-cibuild0053407-alpha
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
What does the pull request do?
This PR brings the behavior of
SelectingItemControl
s withVirtualizingPanel
presenters into parity with those controls without virtualizing presenters.What is the current behavior?
Currently,
SelectingItemsControl
s withVirtualizingPanel
item presenters (such asComboBox
) do not search the full contents of their boxes with text search, only the currently realized controls. This means ~that if aComboBox
is closed, typing does nothing, and even when opened,~ (this was slightly wrong!) it will only jump to items immediately in the popup.What is the updated/expected behavior with this PR?
Now,
ComboBox
es and otherSelectingItemsControl
s with virtualizing presenters will have properTextSearch
for their entire item sets.How was the solution implemented (if it's not obvious)?
The anonymous method that existed in the
SelectingItemsControl
class previously has been moved into a static method inItemsPresenter
. It's now used there and inVirtualizingPanel
to check search their items/children for text search. (Note: I don't know if there is a preferred place for a static method like this; happy to move as appropriate.)Unit test case was added to an existing test and the test was adapted so that ComboBoxes in tests will use a
VirtualizingStackPanel
like the real controls do to ensure the tests fail without this change.Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes #12490.