From 78dd802d3abc8d7b65eeb3c8f91eafb93fff3f91 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 24 Dec 2024 12:23:38 +0100 Subject: [PATCH] Improve some typings --- .../src/components/grid/stores/datasources/index.ts | 4 +--- .../src/components/grid/stores/datasources/viewV2.ts | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/frontend-core/src/components/grid/stores/datasources/index.ts b/packages/frontend-core/src/components/grid/stores/datasources/index.ts index 4f570bd3eb..a03d85e74f 100644 --- a/packages/frontend-core/src/components/grid/stores/datasources/index.ts +++ b/packages/frontend-core/src/components/grid/stores/datasources/index.ts @@ -31,6 +31,4 @@ export interface DatasourceNonPlusActions extends DatasourceBaseActions {} export type DatasourceActions = - | DatasourceTableActions - | DatasourceViewActions - | DatasourceNonPlusActions + | DatasourceTableActions & DatasourceViewActions & DatasourceNonPlusActions diff --git a/packages/frontend-core/src/components/grid/stores/datasources/viewV2.ts b/packages/frontend-core/src/components/grid/stores/datasources/viewV2.ts index f70059e016..e83d866455 100644 --- a/packages/frontend-core/src/components/grid/stores/datasources/viewV2.ts +++ b/packages/frontend-core/src/components/grid/stores/datasources/viewV2.ts @@ -168,7 +168,7 @@ export const initialise = (context: StoreContext) => { field: $sort.column, order: $sort.order || SortOrder.ASCENDING, }, - }) + } as never as UpdateViewRequest) } // Also update the fetch to ensure the new sort is respected. @@ -198,7 +198,7 @@ export const initialise = (context: StoreContext) => { await datasource.actions.saveDefinition({ ...$view, queryUI: $filter, - }) + } as never as UpdateViewRequest) // Refresh data since view definition changed await rows.actions.refreshData()