fix: 🐛 Show all rows in restore state

When you refresh datatable after some rows are hidden, after refresh
they remain hidden.
This commit is contained in:
Faris Ansari 2018-10-05 15:22:47 +05:30
parent d01e045157
commit f790a6729a
4 changed files with 992 additions and 1 deletions

View File

@ -16,7 +16,7 @@
"travis-deploy-once": "travis-deploy-once", "travis-deploy-once": "travis-deploy-once",
"semantic-release": "semantic-release", "semantic-release": "semantic-release",
"lint": "eslint src", "lint": "eslint src",
"commit": "git cz" "commit": "npx git-cz"
}, },
"files": [ "files": [
"dist", "dist",

View File

@ -67,6 +67,7 @@ export default class BodyRenderer {
} }
restoreState() { restoreState() {
this.rowmanager.showAllRows();
this.rowmanager.highlightCheckedRows(); this.rowmanager.highlightCheckedRows();
this.cellmanager.selectAreaOnClusterChanged(); this.cellmanager.selectAreaOnClusterChanged();
this.cellmanager.focusCellOnClusterChanged(); this.cellmanager.focusCellOnClusterChanged();

View File

@ -188,6 +188,11 @@ export default class RowManager {
this.style.removeStyle(selector); this.style.removeStyle(selector);
} }
showAllRows() {
const rowIndices = this.datamanager.getAllRowIndices();
this.showRows(rowIndices);
}
openSingleNode(rowIndex) { openSingleNode(rowIndex) {
const rowsToShow = this.datamanager.getImmediateChildren(rowIndex); const rowsToShow = this.datamanager.getImmediateChildren(rowIndex);
this.showRows(rowsToShow); this.showRows(rowsToShow);

985
yarn.lock

File diff suppressed because it is too large Load Diff