listpage-next 0.0.321 → 0.0.323
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.
|
@@ -12,7 +12,7 @@ export declare const FloatProvider: (props: {
|
|
|
12
12
|
export type FloatComponentProps<T extends Record<string, any> = any> = {
|
|
13
13
|
record: T;
|
|
14
14
|
visible: boolean;
|
|
15
|
-
onClose: (
|
|
15
|
+
onClose: (refresh?: any) => void;
|
|
16
16
|
};
|
|
17
17
|
export type PageFloatProps<T extends Record<string, any> = any> = {
|
|
18
18
|
key: string;
|
|
@@ -8,11 +8,13 @@ function useFloat() {
|
|
|
8
8
|
const Component = store.floats.find((f)=>f.key === visibleFloat?.key)?.render;
|
|
9
9
|
const props = {
|
|
10
10
|
record: visibleFloat?.record,
|
|
11
|
-
onClose: (
|
|
11
|
+
onClose: (refresh)=>{
|
|
12
|
+
const prev = visibleFloat;
|
|
12
13
|
store.hideFloat();
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
if (!prev) return;
|
|
15
|
+
if (Boolean(refresh)) return void store.refreshTable();
|
|
16
|
+
if (true === prev.onCloseCallback) store.refreshTable();
|
|
17
|
+
else if ('function' == typeof prev.onCloseCallback) prev.onCloseCallback();
|
|
16
18
|
},
|
|
17
19
|
visible: true
|
|
18
20
|
};
|