diff --git a/src/Explorer/Panes/AddCollectionPane.ts b/src/Explorer/Panes/AddCollectionPane.ts index 3a8cefb63..9f705551e 100644 --- a/src/Explorer/Panes/AddCollectionPane.ts +++ b/src/Explorer/Panes/AddCollectionPane.ts @@ -92,7 +92,7 @@ export default class AddCollectionPane extends ContextualPaneBase { public freeTierExceedThroughputTooltip: ko.Computed; public canConfigureThroughput: ko.PureComputed; public showUpsellMessage: ko.PureComputed; - public shouldCreateMongoWildcardIndex: ko.Computed; + public shouldCreateMongoWildcardIndex: ko.Observable; private _isSynapseLinkEnabled: ko.Computed; @@ -654,9 +654,7 @@ export default class AddCollectionPane extends ContextualPaneBase { }); }); - this.shouldCreateMongoWildcardIndex = ko.computed(function() { - return this.container.isMongoIndexingEnabled(); - }, this); + this.shouldCreateMongoWildcardIndex = ko.observable(this.container.isMongoIndexingEnabled()); } public getSharedThroughputDefault(): boolean { @@ -681,6 +679,7 @@ export default class AddCollectionPane extends ContextualPaneBase { // TODO: Figure out if a database level partition split is about to happen once shared throughput read is available this.formWarnings(""); this.databaseCreateNewShared(this.getSharedThroughputDefault()); + this.shouldCreateMongoWildcardIndex(this.container.isMongoIndexingEnabled()); if (this.isPreferredApiTable() && !databaseId) { databaseId = SharedConstants.CollectionCreation.TablesAPIDefaultDatabase; } @@ -935,6 +934,8 @@ export default class AddCollectionPane extends ContextualPaneBase { this.autoPilotThroughput(AutoPilotUtils.minAutoPilotThroughput); this.sharedAutoPilotThroughput(AutoPilotUtils.minAutoPilotThroughput); + this.shouldCreateMongoWildcardIndex = ko.observable(this.container.isMongoIndexingEnabled()); + this.uniqueKeys([]); this.useIndexingForSharedThroughput(true);