diff --git a/packages/frontend-core/src/components/grid/stores/config.ts b/packages/frontend-core/src/components/grid/stores/config.ts index dcc1d34200..a020aaa149 100644 --- a/packages/frontend-core/src/components/grid/stores/config.ts +++ b/packages/frontend-core/src/components/grid/stores/config.ts @@ -1,10 +1,10 @@ import { derivedMemo } from "../../../utils" -import { derived, Readable } from "svelte/store" +import { derived, Readable, Writable } from "svelte/store" import { UIDatasource, ViewV2Type } from "@budibase/types" import { Store as StoreContext } from "." -interface ConfigStore { - datasource: UIDatasource +export interface ConfigStore { + datasource: Writable initialSortColumn: Readable initialSortOrder: any initialFilter: any diff --git a/packages/frontend-core/src/components/grid/stores/datasource.ts b/packages/frontend-core/src/components/grid/stores/datasource.ts index 9e86cb5364..d9dd2fb279 100644 --- a/packages/frontend-core/src/components/grid/stores/datasource.ts +++ b/packages/frontend-core/src/components/grid/stores/datasource.ts @@ -14,6 +14,7 @@ import { } from "@budibase/types" import { Store as StoreContext } from "." import { DatasourceActions } from "./datasources" +import { ConfigStore } from "./config" interface DatasourceStore { definition: Writable @@ -28,7 +29,7 @@ interface DerivedDatasourceStore { } interface ActionDatasourceStore { - datasource: DatasourceStore["definition"] & { + datasource: ConfigStore["datasource"] & { actions: DatasourceActions & { refreshDefinition: () => Promise changePrimaryDisplay: (column: string) => Promise