From 98c9ffa3732da1e88d8c7124fceec0f158c00af3 Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Mon, 4 Nov 2024 10:46:07 +0100 Subject: [PATCH] Enable Collection Scale/Settings restore --- src/Explorer/Tabs/SettingsTabV2.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Explorer/Tabs/SettingsTabV2.tsx b/src/Explorer/Tabs/SettingsTabV2.tsx index e0f5358af..f87290d91 100644 --- a/src/Explorer/Tabs/SettingsTabV2.tsx +++ b/src/Explorer/Tabs/SettingsTabV2.tsx @@ -1,3 +1,4 @@ +import { ActionType, OpenCollectionTab, TabKind } from "Contracts/ActionContracts"; import React from "react"; import * as ViewModels from "../../Contracts/ViewModels"; import { SettingsComponent } from "../Controls/Settings/SettingsComponent"; @@ -10,6 +11,18 @@ export class SettingsTabV2 extends TabsBase { } export class CollectionSettingsTabV2 extends SettingsTabV2 { + protected persistedState: OpenCollectionTab; + + constructor(options: ViewModels.TabOptions) { + super(options); + this.persistedState = { + actionType: ActionType.OpenCollectionTab, + tabKind: TabKind.ScaleSettings, + databaseResourceId: options.collection.databaseId, + collectionResourceId: options.collection.id(), + }; + } + public onActivate(): void { super.onActivate(); this.collection.selectedSubnodeKind(ViewModels.CollectionTabKind.CollectionSettingsV2);