From 70cee4da5b9a416a0acf328ff366b7339bab31a2 Mon Sep 17 00:00:00 2001 From: Corepex Date: Tue, 10 Dec 2024 14:44:51 +0100 Subject: [PATCH] renamed `updateCache` to `update` --- .../js/src/core/modules/element/hooks/use-cache-update.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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