(core) Filter out pages for hidden views from the page list.

Summary:
- Filters out hidden pages from docModel.allPagesList (used for knowing default page, and for search iteration).
- Filters out hidden pages from TreeModel (uses raw tableData, so has a different way to filter).

Test Plan: WIP

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D2996
This commit is contained in:
Dmitry S
2021-08-27 13:25:20 -04:00
parent 90d1340b64
commit 3edb3a6826
7 changed files with 51 additions and 30 deletions

View File

@@ -125,7 +125,7 @@ class FinderImpl implements IFinder {
// Initialize the steppers. Returns false if anything goes wrong.
public init(): boolean {
const pages: any[] = this._gristDoc.docModel.allDocPages.peek();
const pages: any[] = this._gristDoc.docModel.visibleDocPages.peek();
this._pageStepper.array = pages;
this._pageStepper.index = pages.findIndex(t => t.viewRef() === this._gristDoc.activeViewId.get());
if (this._pageStepper.index < 0) { return false; }