From 38dfde0c2ec698c12f9c743881f351a2774542fa Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Sun, 27 Nov 2022 22:40:25 -0800 Subject: [PATCH] fix(useShow): Pass queryOptions correctly through useShow hook (#3073) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Pass queryOptions correctly through useShow hook Fixes #3072 * chore: add changeset Co-authored-by: Ă–mer Faruk APLAK --- .changeset/short-mice-fry.md | 5 +++++ packages/core/src/hooks/show/useShow.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/short-mice-fry.md diff --git a/.changeset/short-mice-fry.md b/.changeset/short-mice-fry.md new file mode 100644 index 000000000000..3e66f254bda8 --- /dev/null +++ b/.changeset/short-mice-fry.md @@ -0,0 +1,5 @@ +--- +"@pankod/refine-core": patch +--- + +Fixed `queryOptions` parameter of `useShow` hook diff --git a/packages/core/src/hooks/show/useShow.ts b/packages/core/src/hooks/show/useShow.ts index 77ab71bb8d7c..b560401e2522 100644 --- a/packages/core/src/hooks/show/useShow.ts +++ b/packages/core/src/hooks/show/useShow.ts @@ -95,6 +95,7 @@ export const useShow = < id: showId ?? "", queryOptions: { enabled: showId !== undefined, + ...queryOptions, }, successNotification, errorNotification, @@ -102,7 +103,6 @@ export const useShow = < liveMode, onLiveEvent, dataProviderName, - ...queryOptions, }); return {