Skip to content

Commit

Permalink
fix(md-chips): change data when chips change, fix #363
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanood committed Jan 29, 2017
1 parent 9962213 commit b212037
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/chip/chips.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {bindable, customAttribute} from 'aurelia-templating';
import {bindingMode} from 'aurelia-binding';
import {inject} from 'aurelia-dependency-injection';
import {getLogger} from 'aurelia-logging';

Expand All @@ -7,7 +8,7 @@ import {getLogger} from 'aurelia-logging';
@customAttribute('md-chips')
@inject(Element)
export class MdChips {
@bindable() data = [];
@bindable({ defaultBindingMode: bindingMode.twoWay }) data = [];
@bindable() placeholder = '';
@bindable() secondaryPlaceholder = '';
Expand Down Expand Up @@ -38,9 +39,11 @@ export class MdChips {
onChipAdd(e, chip) {
// fireEvent(this.element, 'change');
this.data = $(this.element).material_chip('data');
}
onChipDelete(e, chip) {
// fireEvent(this.element, 'change');
this.data = $(this.element).material_chip('data');
}
onChipSelect(e, chip) {
// fireEvent(this.element, 'change');
Expand Down

0 comments on commit b212037

Please sign in to comment.