Selection changes include new selection

This commit is contained in:
Pete Richards 2016-08-19 19:07:53 -07:00 committed by Andrew Henry
parent 8c439d8109
commit d341a8be97

View File

@ -8,7 +8,7 @@ define(['EventEmitter'], function (EventEmitter) {
Selection.prototype.select = function (value) {
this.selectedValues.push(value);
this.emit('change');
this.emit('change', this.selectedValues);
return this.deselect.bind(this, value);
};
@ -16,7 +16,7 @@ define(['EventEmitter'], function (EventEmitter) {
this.selectedValues = this.selectedValues.filter(function (v) {
return v !== value;
});
this.emit('change');
this.emit('change', this.selectedValues);
};
Selection.prototype.selected = function () {
@ -25,7 +25,7 @@ define(['EventEmitter'], function (EventEmitter) {
Selection.prototype.clear = function () {
this.selectedValues = [];
this.emit('change');
this.emit('change', this.selectedValues);
};
return Selection;