diff --git a/assets/js/src/core/modules/element/hooks/use-cache-update.ts b/assets/js/src/core/modules/element/hooks/use-cache-update.ts index 08a62a7e5..ed299287c 100644 --- a/assets/js/src/core/modules/element/hooks/use-cache-update.ts +++ b/assets/js/src/core/modules/element/hooks/use-cache-update.ts @@ -19,7 +19,7 @@ import { type ElementType } from '../../../../../types/element-type.d' import { type Element } from '../element-helper' interface UseCacheUpdateHookReturn { - updateCache: (props: UpdateCacheProps) => void + update: (props: UpdateCacheProps) => void updateFieldValue: (id: number, field: string, value: any) => void } @@ -56,7 +56,7 @@ export const useCacheUpdate = (elementType: ElementType, tags: ReadonlyArray { + const update = ({ updateFn }: UpdateCacheProps): void => { cacheEntries.forEach((cacheEntry) => { // @ts-expect-error not compatible with the current type definitions dispatch(api.util.updateQueryData( @@ -88,7 +88,7 @@ export const useCacheUpdate = (elementType: ElementType, tags: ReadonlyArray