Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't persist current tab when display is locked #7882

Merged
merged 11 commits into from
Oct 11, 2024
Next Next commit
Check if a tabs view object is locked before persisting the default t…
…ab displayed
  • Loading branch information
shefalijoshi committed Oct 10, 2024
commit feccc33a95c6a142c0d8d80218e9b73a1496be1b
5 changes: 4 additions & 1 deletion src/plugins/tabs/components/TabsComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,10 @@ export default {
this.internalDomainObject = domainObject;
},
persistCurrentTabIndex(index) {
this.openmct.objects.mutate(this.internalDomainObject, 'currentTabIndex', index);
//only persist if the domain object is not locked. The object mutate API will deal with whether the object is persistable or not.
if (!this.internalDomainObject.locked) {
this.openmct.objects.mutate(this.internalDomainObject, 'currentTabIndex', index);
}
},
storeCurrentTabIndexInURL(index) {
let currentTabIndexInURL = this.openmct.router.getSearchParam(this.searchTabKey);
Expand Down