react-toolkits 2.13.15 → 2.13.16

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.13.16
4
+
5
+ ### Patch Changes
6
+
7
+ - 836e406: alpha
8
+
3
9
  ## 2.13.15
4
10
 
5
11
  ### Patch Changes
package/lib/index.d.ts CHANGED
@@ -153,6 +153,7 @@ interface UseModalOperation {
153
153
  interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoading' | 'onOk' | 'onCancel'> {
154
154
  content?: ReactNode | ((operation: UseModalOperation) => ReactNode);
155
155
  onConfirm?: () => void | Promise<void>;
156
+ afterOpen?: () => void | Promise<void>;
156
157
  }
157
158
  declare function useModal(props: UseModalProps): {
158
159
  id: number;
package/lib/index.js CHANGED
@@ -1037,7 +1037,7 @@ var init_stores4 = __esm({
1037
1037
  }
1038
1038
  });
1039
1039
  function useModal(props) {
1040
- const { content, onConfirm, ...modalProps } = props;
1040
+ const { content, onConfirm, afterOpen, ...modalProps } = props;
1041
1041
  const _id = useMemo(() => ++id, []);
1042
1042
  const { show, hide, isOpen } = useModalStore();
1043
1043
  const open = isOpen(_id);
@@ -1045,6 +1045,7 @@ function useModal(props) {
1045
1045
  const isRenderFunction = typeof content === "function";
1046
1046
  const _show = () => {
1047
1047
  show(_id);
1048
+ afterOpen?.();
1048
1049
  };
1049
1050
  const _hide = () => {
1050
1051
  hide(_id);