[MdListOption] value always boolean, selectChange/deselected events don't fire
See original GitHub issueBug, feature request, or proposal:
MdListOption’s output EventEmitters selectChange, and deselected do not fire when the item is selected/deselected.
What is the expected behavior?
They should activate the angular expression bound to them.
What is the current behavior?
Here’s the code block I’m working with:
<md-selection-list class="selection-content-list">
<md-list-option class="list-item" (selectChange)="selectedItem($event)" (deselected)="deselectedItem($event)" [disabled]="selectionItem.disabled" *ngFor="let selectionItem of (elements | async)">
<md-icon mdListIcon>folder</md-icon>
<h4 mdLine>{{ selectionItem.name }}</h4>
</md-list-option>
</md-selection-list>
The items visually update when being clicked on and off. The MdSelectionList’s selectedOptions variable updates properly. The selectChange and deselected EventEmitters are never activated.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular Material 2.0.0-beta.10
Is there anything else we should know?
Looking at the current code, it looks like they aren’t ever used or references apart from their declarations.
The focus and destroyed events seem to emit fine though.
Also the value variable for MdListOption is coerced to a boolean value so even using selectedOptions doesn’t make the MdListOption useable.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Change boolean on (change) event - angular - Stack Overflow
I made it work, but instead of [value] in HTML, i just used value (without squarebrackets) for the buttons, so in the TypeScript...
Read more >Toggle default event – On Value Changed (Boolean) - O'Reilly
This event will trigger whenever the toggle is selected or deselected. It can accept a Boolean argument. When a public function has a...
Read more >Detecting value change without event case - NI Community
Solved: Hello Community! I have an application that uses a boolean controler to make a string controller visible. In this string controller ...
Read more >True/False (Boolean) Field Behavior in ServiceNow
Change every query automatically to the database for these fields to include the OR <field> is null to ensure all matching records are...
Read more >Is there any way to fire an event on boolean value change?
I got a bool in my blueprint, I want to fire an event once the bool value changes. Is there anyway to create...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dereekb created issue #7183 just in case you want to follow it.
A plunk is always useful: https://plnkr.co/edit/6y5tPM?p=preview