fix: tab systems erroring out due to out of sync tabOrdering and tabMap
This commit is contained in:
@@ -3,11 +3,16 @@ import { getDefaultGQLRequest } from "~/helpers/graphql/default"
|
|||||||
import { HoppGQLDocument, HoppGQLSaveContext } from "~/helpers/graphql/document"
|
import { HoppGQLDocument, HoppGQLSaveContext } from "~/helpers/graphql/document"
|
||||||
import { TabService } from "./tab"
|
import { TabService } from "./tab"
|
||||||
import { computed } from "vue"
|
import { computed } from "vue"
|
||||||
|
import { Container } from "dioc"
|
||||||
|
|
||||||
export class GQLTabService extends TabService<HoppGQLDocument> {
|
export class GQLTabService extends TabService<HoppGQLDocument> {
|
||||||
public static readonly ID = "GQL_TAB_SERVICE"
|
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", {
|
this.tabMap.set("test", {
|
||||||
id: "test",
|
id: "test",
|
||||||
document: {
|
document: {
|
||||||
|
|||||||
@@ -3,11 +3,16 @@ import { computed } from "vue"
|
|||||||
import { getDefaultRESTRequest } from "~/helpers/rest/default"
|
import { getDefaultRESTRequest } from "~/helpers/rest/default"
|
||||||
import { HoppRESTDocument, HoppRESTSaveContext } from "~/helpers/rest/document"
|
import { HoppRESTDocument, HoppRESTSaveContext } from "~/helpers/rest/document"
|
||||||
import { TabService } from "./tab"
|
import { TabService } from "./tab"
|
||||||
|
import { Container } from "dioc"
|
||||||
|
|
||||||
export class RESTTabService extends TabService<HoppRESTDocument> {
|
export class RESTTabService extends TabService<HoppRESTDocument> {
|
||||||
public static readonly ID = "REST_TAB_SERVICE"
|
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", {
|
this.tabMap.set("test", {
|
||||||
id: "test",
|
id: "test",
|
||||||
document: {
|
document: {
|
||||||
|
|||||||
Reference in New Issue
Block a user