Vanessa 2025-10-26 11:00:01 +08:00
parent bb6139efc1
commit 7b7750ea4c

View file

@ -641,8 +641,12 @@ export class Outline extends Model {
}, storageResponse => { }, storageResponse => {
const storageData = storageResponse.data; const storageData = storageResponse.data;
if (storageData && storageData.expandIds) { if (storageData && storageData.expandIds) {
if (storageData.expandIds.length === 0) {
this.tree.collapseAll();
} else {
this.tree.setExpandIds(storageData.expandIds); this.tree.setExpandIds(storageData.expandIds);
} }
}
if ((this.headerElement.querySelector("input.b3-text-field.search__label") as HTMLInputElement).value) { if ((this.headerElement.querySelector("input.b3-text-field.search__label") as HTMLInputElement).value) {
this.setFilter(); this.setFilter();
} }