Skip to content

Commit

Permalink
feat(md-chips): propagate chip editor events
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanood committed Jan 29, 2017
1 parent b212037 commit b8d13be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/chip/chips.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {bindingMode} from 'aurelia-binding';
import {inject} from 'aurelia-dependency-injection';
import {getLogger} from 'aurelia-logging';

// import {fireEvent} from '../common/events';
import {fireEvent} from '../common/events';

@customAttribute('md-chips')
@inject(Element)
Expand Down Expand Up @@ -38,14 +38,14 @@ export class MdChips {
}
onChipAdd(e, chip) {
// fireEvent(this.element, 'change');
this.data = $(this.element).material_chip('data');
fireEvent(this.element, 'change', { operation: 'add', target: chip, data });
}
onChipDelete(e, chip) {
// fireEvent(this.element, 'change');
this.data = $(this.element).material_chip('data');
fireEvent(this.element, 'change', { operation: 'delete', target: chip, data });
}
onChipSelect(e, chip) {
// fireEvent(this.element, 'change');
fireEvent(this.element, 'selected', { target: chip });
}
}

0 comments on commit b8d13be

Please sign in to comment.