Skip to content

Commit

Permalink
fix(data-table-v2): fix the undefined method called when press in esc…
Browse files Browse the repository at this point in the history
…ape key, resolves #674
  • Loading branch information
rezak-otmani committed Jun 19, 2018
1 parent 06f7450 commit 1bcb5e6
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/components/data-table-v2/data-table-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,21 +210,9 @@ class DataTableV2 extends mixin(createComponent, initComponentBySearch, eventedS
});
};

_batchCancel() {
const inputs = [...this.element.querySelectorAll(this.options.selectorCheckbox)];

inputs.forEach(item => {
item.checked = false;
});

this.state.checkboxCount = 0;
this._actionBarToggle(false);
this.countEl.textContent = this.state.checkboxCount;
}

_keydownHandler = evt => {
if (evt.which === 27) {
this._batchCancel();
this._actionBarCancel();
}
};

Expand Down

0 comments on commit 1bcb5e6

Please sign in to comment.