feat(AutoSuggestBox): add ShowSuggestionsOnFocus property#4077
Draft
corvinsz wants to merge 6 commits into
Draft
feat(AutoSuggestBox): add ShowSuggestionsOnFocus property#4077corvinsz wants to merge 6 commits into
corvinsz wants to merge 6 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initially I just wanted to add a search dialog (blatantly stolen from mudblazor). While doing so, I noticed a few things with the
AutoSuggestBox.Demo app changes
Added a shortcut
Ctrl+Kto open a dialog so users can search and jump to pages using hotkeys.AutoSuggestBoxchangesShowSuggestionsOnFocusOnGotFocusmethod to open the suggestion listbox whenShowSuggestionsOnFocus="True"e.Handled="true"in theOnPreviewKeyDown. With this in place, consumers can't have custom actions on theAutoSuggestBoxon the call-site. For example handling theEsckey to close the search-dialog (like I have done it in the demo apps).For some reason I can't reproduce the bug that
e.Handled="true"was supposed to fix.GetItemCount())Placement="Bottom"andPlacementTarget="{Binding ElementName=OuterBorder}"to thePopupEx, because without it the popup wouldn't update it's position when moving the window:StaysOpen="False"the list wasn't reliably opened, so I changed it totrue(e.g. open search dialog -> move window -> focus theAutoSuggestBoxagain and see that the list wouldn't open again)