-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(cdk-experimental/listbox): ignore spaces during typeahead #30766
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
Conversation
088bceb
to
7834956
Compare
@@ -91,6 +91,9 @@ export class ListboxPattern<V> { | |||
return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight'; | |||
}); | |||
|
|||
/** Represents the space key. Does nothing when the user is actively using typeahead. */ | |||
spaceKey = computed(() => (this.typeahead.query().length ? '' : ' ')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about something like spaceSelectionKey
, or something similar, to imply there's more to it than just watching spaceKey
?
Below the logic just seems to always trigger on "space key"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or should this just generally be selectionKey
and include the 'Enter' key in this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We wouldn't be able to include "Enter" unless we change the event manager to also accept Signal. Imo the fact that we're using a signal instead of just the character " " already indicates there's more going on here, but I updated the name to "dynamicSpaceKey" anyway
src/cdk-experimental/ui-patterns/behaviors/list-typeahead/list-typeahead.ts
Outdated
Show resolved
Hide resolved
fe84f96
to
bc750a3
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.