Update promises

This commit is contained in:
Adria Navarro 2024-12-30 22:47:41 +01:00
parent 9c686cf7ca
commit a41f0292a0
2 changed files with 5 additions and 5 deletions

View File

@ -106,7 +106,7 @@ export const initialise = (context: StoreContext) => {
if (!isSameDatasource($fetch?.options?.datasource, $datasource)) {
return
}
$fetch.update({
$fetch?.update({
filter: $allFilters,
})
})
@ -120,7 +120,7 @@ export const initialise = (context: StoreContext) => {
if (!isSameDatasource($fetch?.options?.datasource, $datasource)) {
return
}
$fetch.update({
$fetch?.update({
sortOrder: $sort.order || SortOrder.ASCENDING,
sortColumn: $sort.column,
})

View File

@ -65,7 +65,7 @@ interface RowActionStore {
loadNextPage: () => void
refreshRow: (id: string) => Promise<void>
replaceRow: (id: string, row: UIRow | undefined) => void
refreshData: () => void
refreshData: () => Promise<void>
cleanRow: (row: UIRow) => Row
bulkUpdate: (
changeMap: Record<string, Record<string, any>>,
@ -514,8 +514,8 @@ export const createActions = (context: StoreContext): RowActionStore => {
}
// Refreshes all data
const refreshData = () => {
get(fetch)?.getInitialData()
const refreshData = async () => {
await get(fetch)?.getInitialData()
}
// Checks if a changeset for a row actually mutates the row or not