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

matChipInput: Add global configuration option for separator key codes #10256

Closed
kherock opened this issue Mar 4, 2018 · 1 comment · Fixed by #10264
Closed

matChipInput: Add global configuration option for separator key codes #10256

kherock opened this issue Mar 4, 2018 · 1 comment · Fixed by #10264
Assignees
Labels
P4 A relatively minor issue that is not relevant to core functions

Comments

@kherock
Copy link
Contributor

kherock commented Mar 4, 2018

Bug, feature request, or proposal:

Feature request

What is the expected behavior?

It would be nice to be able configure the default key code list using an injection token. This is already possible with other components such as autocomplete with its MAT_AUTOCOMPLETE_DEFAULT_OPTIONS token.

What is the current behavior?

Chip inputs use [ENTER] as the default separator key code list.

What is the use-case or motivation for changing an existing behavior?

My app has several chip input fields and I have to specify the same list of key codes every time. I don't have much reason to use different lists across different fields since I want my users to be able to expect all chip input fields to behave the same.

@crisbeto crisbeto self-assigned this Mar 4, 2018
@crisbeto crisbeto added has pr P4 A relatively minor issue that is not relevant to core functions labels Mar 5, 2018
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 5, 2018
Adds the `MAT_CHIPS_DEFAULT_OPTIONS` injection token that allows consumers to override `separatorKeyCodes`, as well as any other options that we decide to add in the future, for the entire module.

Fixes angular#10256.
mmalerba pushed a commit that referenced this issue Mar 15, 2018
Adds the `MAT_CHIPS_DEFAULT_OPTIONS` injection token that allows consumers to override `separatorKeyCodes`, as well as any other options that we decide to add in the future, for the entire module.

Fixes #10256.
andrewseguin pushed a commit that referenced this issue Mar 19, 2018
…10264)

Adds the `MAT_CHIPS_DEFAULT_OPTIONS` injection token that allows consumers to override `separatorKeyCodes`, as well as any other options that we decide to add in the future, for the entire module.

Fixes #10256.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants