diff --git a/packages/frontend-core/src/components/grid/stores/rows.ts b/packages/frontend-core/src/components/grid/stores/rows.ts index 263a3c1469..f65730bd02 100644 --- a/packages/frontend-core/src/components/grid/stores/rows.ts +++ b/packages/frontend-core/src/components/grid/stores/rows.ts @@ -10,7 +10,7 @@ import { import { tick } from "svelte" import { Helpers } from "@budibase/bbui" import { sleep } from "../../../utils/utils" -import { FieldType, Row, UIRow } from "@budibase/types" +import { FieldType, Row, UIFetchAPI, UIRow } from "@budibase/types" import { getRelatedTableValues } from "../../../utils" import { Store as StoreContext } from "." @@ -20,7 +20,7 @@ interface IndexedUIRow extends UIRow { interface RowStore { rows: Writable - fetch: Writable + fetch: Writable loaded: Writable refreshing: Writable loading: Writable diff --git a/packages/types/src/ui/stores/grid/fetch.ts b/packages/types/src/ui/stores/grid/fetch.ts new file mode 100644 index 0000000000..cca738bb0d --- /dev/null +++ b/packages/types/src/ui/stores/grid/fetch.ts @@ -0,0 +1,4 @@ +export interface UIFetchAPI { + getInitialData: () => Promise + nextPage: () => Promise +} diff --git a/packages/types/src/ui/stores/grid/index.ts b/packages/types/src/ui/stores/grid/index.ts index 880c3834c1..82126f13aa 100644 --- a/packages/types/src/ui/stores/grid/index.ts +++ b/packages/types/src/ui/stores/grid/index.ts @@ -5,3 +5,4 @@ export * from "./view" export * from "./user" export * from "./filters" export * from "./rows" +export * from "./fetch"