From b2d26e987b1f9d81a91ab138cea8896d01f77d87 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 27 Feb 2018 18:58:30 +0530 Subject: [PATCH] Add helper to getFilteredRowIndices --- dist/frappe-datatable.cjs.js | 6 ++++++ dist/frappe-datatable.js | 6 ++++++ docs/frappe-datatable.js | 6 ++++++ src/datamanager.js | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/dist/frappe-datatable.cjs.js b/dist/frappe-datatable.cjs.js index 8e71586..83e645d 100644 --- a/dist/frappe-datatable.cjs.js +++ b/dist/frappe-datatable.cjs.js @@ -1264,12 +1264,18 @@ class DataManager { } }); + this._filteredRows = rowsToShow; + return { rowsToHide, rowsToShow }; } + getFilteredRowIndices() { + return this._filteredRows || []; + } + getRowCount() { return this.rowCount; } diff --git a/dist/frappe-datatable.js b/dist/frappe-datatable.js index 67400bf..a18f4e0 100644 --- a/dist/frappe-datatable.js +++ b/dist/frappe-datatable.js @@ -1263,12 +1263,18 @@ class DataManager { } }); + this._filteredRows = rowsToShow; + return { rowsToHide, rowsToShow }; } + getFilteredRowIndices() { + return this._filteredRows || []; + } + getRowCount() { return this.rowCount; } diff --git a/docs/frappe-datatable.js b/docs/frappe-datatable.js index 67400bf..a18f4e0 100644 --- a/docs/frappe-datatable.js +++ b/docs/frappe-datatable.js @@ -1263,12 +1263,18 @@ class DataManager { } }); + this._filteredRows = rowsToShow; + return { rowsToHide, rowsToShow }; } + getFilteredRowIndices() { + return this._filteredRows || []; + } + getRowCount() { return this.rowCount; } diff --git a/src/datamanager.js b/src/datamanager.js index 6995d7f..fcb96eb 100644 --- a/src/datamanager.js +++ b/src/datamanager.js @@ -417,12 +417,18 @@ export default class DataManager { } }); + this._filteredRows = rowsToShow; + return { rowsToHide, rowsToShow }; } + getFilteredRowIndices() { + return this._filteredRows || []; + } + getRowCount() { return this.rowCount; }