Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

feat(chips): add support for ng-change #11161

Closed
chenlijun99 opened this issue Mar 12, 2018 · 1 comment · Fixed by #11166 or #11237
Closed

feat(chips): add support for ng-change #11161

chenlijun99 opened this issue Mar 12, 2018 · 1 comment · Fixed by #11166 or #11237
Assignees
Labels
has: Pull Request A PR has been created to address this issue P4: minor Minor issues. May not be fixed without community contributions. resolution: fixed type: enhancement
Milestone

Comments

@chenlijun99
Copy link
Contributor

chenlijun99 commented Mar 12, 2018

Bug, feature request, or proposal:

ng-change is not triggered when I add a chip or remove it.

What is the expected behavior?

ng-change should be triggered.

What is the current behavior?

ng-change is not triggered.

CodePen and steps to reproduce the issue:

CodePen Demo which shows your issue: https://codepen.io/free-easy/pen/PRPKjM
Detailed Reproduction Steps:

Try to insert some chip and you'll notice that ng-change is not triggered.

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

Well, I think that any component using ng-model, should also support ng-change, since
internally it should call ngModelController.$setViewValue.

Sure, md-chips supplies md-on-add and md-on-remove, which should suffice, but in my case
I'm using the ngModelOptions getterSetter: true and the setter, just as ng-change, seems to not be called.

Which versions of AngularJS, Material, OS, and browsers are affected?

AngularJs: 1.5.5 (the default one of the CodePen that you supply
Angular Material: 1.1.7

Is there anything else we should know? Stack Traces, Screenshots, etc.

@Splaktar Splaktar self-assigned this Mar 13, 2018
@Splaktar Splaktar changed the title mdChips: ng-change not triggered on chip add/removal feat(chips): add support for ng-change Mar 13, 2018
@Splaktar Splaktar added this to the - Backlog milestone Mar 13, 2018
@Splaktar Splaktar added for: external contributor P4: minor Minor issues. May not be fixed without community contributions. labels Mar 13, 2018
@Splaktar
Copy link
Member

This is related to #3857. In both cases, ng-change is not supported with md-chips. We would be willing to consider a PR from the community that added this support.

chenlijun99 added a commit to chenlijun99/material that referenced this issue Mar 13, 2018
@Splaktar Splaktar added has: Pull Request A PR has been created to address this issue and removed needs: Pull Request labels Mar 13, 2018
@Splaktar Splaktar modified the milestones: - Backlog, 1.1.9 Mar 13, 2018
chenlijun99 added a commit to chenlijun99/material that referenced this issue Mar 13, 2018
chenlijun99 added a commit to chenlijun99/material that referenced this issue Mar 13, 2018
chenlijun99 added a commit to chenlijun99/material that referenced this issue Mar 13, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes angular#11161
Closes angular#3857
chenlijun99 added a commit to chenlijun99/material that referenced this issue Mar 14, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes angular#11161
Closes angular#3857
chenlijun99 added a commit to chenlijun99/material that referenced this issue Mar 14, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes angular#11161
Closes angular#3857
chenlijun99 added a commit to chenlijun99/material that referenced this issue Mar 15, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes angular#11161
Closes angular#3857
andrewseguin pushed a commit that referenced this issue Mar 23, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes #11161
Closes #3857
Splaktar pushed a commit that referenced this issue Apr 16, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes #11161
Closes #3857
mmalerba pushed a commit that referenced this issue Apr 17, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes #11161
Closes #3857
chmelevskij pushed a commit to chmelevskij/material that referenced this issue Jun 19, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes angular#11161
Closes angular#3857
chmelevskij pushed a commit to chmelevskij/material that referenced this issue Jun 19, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes angular#11161
Closes angular#3857
Splaktar pushed a commit that referenced this issue Jul 31, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes #11161
Closes #3857
Splaktar added a commit that referenced this issue Jul 31, 2018
* Add test of `ng-change` for `md-chips`
* Add docs regarding `ng-change` for `md-chips` and `md-contact-chips`
* Add demo for ng-change on `md-chips`
* Add demo for ng-change on `md-contact-chips`

Closes #11161
Closes #3857
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue P4: minor Minor issues. May not be fixed without community contributions. resolution: fixed type: enhancement
Projects
None yet
2 participants