fix: tab systems erroring out due to out of sync tabOrdering and tabMap

This commit is contained in:
Andrew Bastin
2024-04-29 20:32:27 +05:30
parent 934dc473f0
commit 426e7594f4
2 changed files with 12 additions and 2 deletions

View File

@@ -3,11 +3,16 @@ import { getDefaultGQLRequest } from "~/helpers/graphql/default"
import { HoppGQLDocument, HoppGQLSaveContext } from "~/helpers/graphql/document"
import { TabService } from "./tab"
import { computed } from "vue"
import { Container } from "dioc"
export class GQLTabService extends TabService<HoppGQLDocument> {
public static readonly ID = "GQL_TAB_SERVICE"
override onServiceInit() {
// TODO: Moving this to `onServiceInit` breaks `persistableTabState`
// Figure out how to fix this
constructor(c: Container) {
super(c)
this.tabMap.set("test", {
id: "test",
document: {

View File

@@ -3,11 +3,16 @@ import { computed } from "vue"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
import { HoppRESTDocument, HoppRESTSaveContext } from "~/helpers/rest/document"
import { TabService } from "./tab"
import { Container } from "dioc"
export class RESTTabService extends TabService<HoppRESTDocument> {
public static readonly ID = "REST_TAB_SERVICE"
override onServiceInit() {
// TODO: Moving this to `onServiceInit` breaks `persistableTabState`
// Figure out how to fix this
constructor(c: Container) {
super(c)
this.tabMap.set("test", {
id: "test",
document: {