Improve some typings
This commit is contained in:
parent
7c05c5473d
commit
78dd802d3a
|
@ -31,6 +31,4 @@ export interface DatasourceNonPlusActions
|
||||||
extends DatasourceBaseActions<UIDatasource, never> {}
|
extends DatasourceBaseActions<UIDatasource, never> {}
|
||||||
|
|
||||||
export type DatasourceActions =
|
export type DatasourceActions =
|
||||||
| DatasourceTableActions
|
| DatasourceTableActions & DatasourceViewActions & DatasourceNonPlusActions
|
||||||
| DatasourceViewActions
|
|
||||||
| DatasourceNonPlusActions
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ export const initialise = (context: StoreContext) => {
|
||||||
field: $sort.column,
|
field: $sort.column,
|
||||||
order: $sort.order || SortOrder.ASCENDING,
|
order: $sort.order || SortOrder.ASCENDING,
|
||||||
},
|
},
|
||||||
})
|
} as never as UpdateViewRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also update the fetch to ensure the new sort is respected.
|
// Also update the fetch to ensure the new sort is respected.
|
||||||
|
@ -198,7 +198,7 @@ export const initialise = (context: StoreContext) => {
|
||||||
await datasource.actions.saveDefinition({
|
await datasource.actions.saveDefinition({
|
||||||
...$view,
|
...$view,
|
||||||
queryUI: $filter,
|
queryUI: $filter,
|
||||||
})
|
} as never as UpdateViewRequest)
|
||||||
|
|
||||||
// Refresh data since view definition changed
|
// Refresh data since view definition changed
|
||||||
await rows.actions.refreshData()
|
await rows.actions.refreshData()
|
||||||
|
|
Loading…
Reference in New Issue