react-toolkits 2.13.16 → 2.13.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -157,7 +157,7 @@ interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoading' | 'on
|
|
|
157
157
|
}
|
|
158
158
|
declare function useModal(props: UseModalProps): {
|
|
159
159
|
id: number;
|
|
160
|
-
show: () => void
|
|
160
|
+
show: () => Promise<void>;
|
|
161
161
|
hide: () => void;
|
|
162
162
|
modal: react_jsx_runtime.JSX.Element;
|
|
163
163
|
};
|
package/lib/index.js
CHANGED
|
@@ -1043,9 +1043,9 @@ function useModal(props) {
|
|
|
1043
1043
|
const open = isOpen(_id);
|
|
1044
1044
|
const [confirmLoading, setConfirmLoading] = useState(false);
|
|
1045
1045
|
const isRenderFunction = typeof content === "function";
|
|
1046
|
-
const _show = () => {
|
|
1046
|
+
const _show = async () => {
|
|
1047
1047
|
show(_id);
|
|
1048
|
-
afterOpen?.();
|
|
1048
|
+
await afterOpen?.();
|
|
1049
1049
|
};
|
|
1050
1050
|
const _hide = () => {
|
|
1051
1051
|
hide(_id);
|