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

View File

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