Skip to content

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

Merged
mmalerba merged 1 commit into
angular:masterfrom
vanessanschmitt:errorMatcher
Apr 7, 2020
Merged

mmalerba merged 1 commit into
angular:masterfrom
vanessanschmitt:errorMatcher

Conversation

@vanessanschmitt

Copy link
Copy Markdown
Contributor

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

mmalerba commented Apr 3, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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

mmalerba commented Apr 6, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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

mmalerba commented Apr 6, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

3 participants