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

fix(cdk-experimental/listbox): ignore spaces during typeahead #30766

Merged
merged 3 commits into from
Apr 11, 2025

Conversation

wagnermaciel
Copy link
Contributor

No description provided.

@wagnermaciel wagnermaciel added the target: major This PR is targeted for the next major release label Apr 1, 2025
@wagnermaciel wagnermaciel marked this pull request as ready for review April 10, 2025 20:24
@wagnermaciel wagnermaciel requested a review from a team as a code owner April 10, 2025 20:24
@wagnermaciel wagnermaciel requested review from crisbeto and andrewseguin and removed request for a team April 10, 2025 20:24
@@ -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 ? '' : ' '));
Copy link
Contributor

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"

Copy link
Contributor

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

Copy link
Contributor Author

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

@wagnermaciel wagnermaciel removed the request for review from crisbeto April 11, 2025 15:54
@wagnermaciel wagnermaciel added the action: merge The PR is ready for merge by the caretaker label Apr 11, 2025
@wagnermaciel wagnermaciel merged commit 184ceee into angular:main Apr 11, 2025
17 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants