Add option to disable checkedRowStatus
This commit is contained in:
parent
0a402b3f38
commit
51a8f0dd83
@ -33,7 +33,7 @@ export default class RowManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bindCheckbox() {
|
bindCheckbox() {
|
||||||
if (!this.options.addCheckboxColumn) return;
|
if (!this.options.checkboxColumn) return;
|
||||||
|
|
||||||
// map of checked rows
|
// map of checked rows
|
||||||
this.checkMap = [];
|
this.checkMap = [];
|
||||||
@ -124,9 +124,11 @@ export default class RowManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
showCheckStatus() {
|
showCheckStatus() {
|
||||||
|
if (!this.options.checkedRowStatus) return;
|
||||||
const checkedRows = this.getCheckedRows();
|
const checkedRows = this.getCheckedRows();
|
||||||
if (checkedRows.length > 0) {
|
const count = checkedRows.length;
|
||||||
this.bodyRenderer.showToastMessage(checkedRows.length + ' rows selected');
|
if (count > 0) {
|
||||||
|
this.bodyRenderer.showToastMessage(`${count} row${count > 1 ? 's' : ''} selected`);
|
||||||
} else {
|
} else {
|
||||||
this.bodyRenderer.clearToastMessage();
|
this.bodyRenderer.clearToastMessage();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user