Add option to disable checkedRowStatus

This commit is contained in:
Faris Ansari 2018-03-13 10:36:41 +05:30
parent 0a402b3f38
commit 51a8f0dd83

View File

@ -33,7 +33,7 @@ export default class RowManager {
}
bindCheckbox() {
if (!this.options.addCheckboxColumn) return;
if (!this.options.checkboxColumn) return;
// map of checked rows
this.checkMap = [];
@ -124,9 +124,11 @@ export default class RowManager {
}
showCheckStatus() {
if (!this.options.checkedRowStatus) return;
const checkedRows = this.getCheckedRows();
if (checkedRows.length > 0) {
this.bodyRenderer.showToastMessage(checkedRows.length + ' rows selected');
const count = checkedRows.length;
if (count > 0) {
this.bodyRenderer.showToastMessage(`${count} row${count > 1 ? 's' : ''} selected`);
} else {
this.bodyRenderer.clearToastMessage();
}