Skip to content

MdCheckbox does not pass a change event to change handler #2146

Open
@mark-langer

Description

@mark-langer

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The component should return a change event like any regular HTML input element does, too. Interestingly, MdInput does return a regular change event.

What is the current behavior?

When binding an event handler via the (change)="doSomethingOnChange($event)" notation, the MdCheckbox component does not return a DOM change event when checked/unchecked but a custom angular event, which does not bubble like a change event should.

What are the steps to reproduce?

Simply register a change event handler on an <md-checkbox> and log the event.

http://plnkr.co/edit/4KRXLDmbHU2pO7RvBiaw?p=preview

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

The event should bubble just like a regular HTML checkbox's events bubble so that container elements can catch their events.

Which versions of Angular, Material, OS, browsers are affected?

I tried both 2.0.2 and 2.3.0

Is there anything else we should know?

A fix would be fantastic. We all appreciate your team's great work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/checkboxneeds: discussionFurther discussion with the team is needed before proceeding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions