Skip to content

fix(material-experimental/mdc-chips): support custom errorStateMatcher #18974

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

Merged
merged 1 commit into from
Apr 7, 2020

Conversation

vanessanschmitt
Copy link
Collaborator

MatChipGrid should have an errorStateMatcher Input in order to be
backwards compatible with the old non-mdc MatChipList.

MatChipGrid should have an errorStateMatcher Input in order to be
backwards compatible with the old non-mdc MatChipList.
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 2, 2020
@mmalerba
Copy link
Contributor

mmalerba commented Apr 3, 2020

Is this just a no-op because only the mat-chip-listbox should actually be used with an input? If that's the case then maybe we shouldn't add this back. We'll just document it as a breaking change to be aware of and recommend that people use the listbox version with inputs.

@vanessanschmitt
Copy link
Collaborator Author

mat-chip-grid is the one that gets used with matChipInputFor. So I think we still want it! There's a use case in Pantheon that I'm trying to migrate to mat-chip-grid where someone is using their own errorStateMatcher.

@mmalerba
Copy link
Contributor

mmalerba commented Apr 6, 2020

But don't we need to do something with ErrorStateMatcher, it looks like in this PR we're just taking it as an input and then ignoring it. (Unless it just needs to be here for some other component to read it, form-field maybe? It's been a while so I can't really remember how it's all hooked up 😄)

@vanessanschmitt
Copy link
Collaborator Author

Oh haha I see what you're saying! It does look like that. I think it's being used here in mixinErrorState: https://github.com/angular/components/blob/master/src/material/core/common-behaviors/error-state.ts#L55 which is part of _MatChipGridMixinBase
here: https://github.com/angular/components/blob/master/src/material-experimental/mdc-chips/chip-grid.ts#L73

@mmalerba
Copy link
Contributor

mmalerba commented Apr 6, 2020

Ahh ok, figured it was just me being dumb

@mmalerba mmalerba added G This is is related to a Google internal issue lgtm action: merge The PR is ready for merge by the caretaker P2 The issue is important to a large percentage of users, with a workaround labels Apr 6, 2020
@mmalerba mmalerba added the target: patch This PR is targeted for the next patch release label Apr 7, 2020
@mmalerba mmalerba merged commit 96fd585 into angular:master Apr 7, 2020
mmalerba pushed a commit that referenced this pull request Apr 14, 2020
MatChipGrid should have an errorStateMatcher Input in order to be
backwards compatible with the old non-mdc MatChipList.
@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 May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement G This is is related to a Google internal issue P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants