zustand-fetching
Advanced tools
Comparing version 1.0.6-beta to 1.0.6
@@ -26,2 +26,3 @@ import { StoreApi } from "zustand"; | ||
reaction?: ((params: IModalActionType<Data, M>) => any) | undefined; | ||
clearOnClose?: boolean | undefined; | ||
} | undefined) => IModalCreator<Data, M>; | ||
@@ -48,2 +49,3 @@ /** | ||
reaction?: ((params: IModalActionType<Data, M>) => any) | undefined; | ||
clearOnClose?: boolean | undefined; | ||
} | undefined) => Record<K, IModalCreator<Data, M>>; |
@@ -6,3 +6,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
if (params.type === "CLOSE") { | ||
set({ isOpen: false, data: initialState }); | ||
set({ | ||
isOpen: false, | ||
data: (extra === null || extra === void 0 ? void 0 : extra.clearOnClose) ? initialState : get().data, | ||
}); | ||
} | ||
@@ -9,0 +12,0 @@ else if (params.type === "OPEN") { |
{ | ||
"name": "zustand-fetching", | ||
"version": "1.0.6-beta", | ||
"version": "1.0.6", | ||
"private": false, | ||
@@ -79,3 +79,3 @@ "description": "Zustand fetching helpers", | ||
"react": ">=17", | ||
"zustand": ">=3" | ||
"zustand": ">=4" | ||
}, | ||
@@ -82,0 +82,0 @@ "engines": { |
@@ -127,3 +127,3 @@ # Zustand Fetching Helpers | ||
{status === "loading" && <>loading...</>} | ||
{status === "error" && <>{error}</>} | ||
{status === "error" && <>{error.result.message}</>} | ||
</> | ||
@@ -130,0 +130,0 @@ } |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
392
1
35177
15