Skip to content

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

Closed
@kherock

Description

@kherock

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.

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions