@applica-software-guru/react-admin 1.5.236 → 1.5.237
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/dist/components/ra-buttons/CreateInDialogButton.d.ts +1 -0
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts +1 -0
- package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +29 -29
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +846 -833
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +29 -29
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-buttons/CreateInDialogButton.tsx +10 -3
- package/src/components/ra-buttons/EditInDialogButton.tsx +3 -1
package/package.json
CHANGED
|
@@ -67,7 +67,7 @@ type CreateInDialogButtonProps = PropsWithChildren &
|
|
|
67
67
|
maxWidth: Breakpoint;
|
|
68
68
|
fullWidth?: boolean;
|
|
69
69
|
fullScreen?: boolean;
|
|
70
|
-
|
|
70
|
+
scroll: 'paper' | 'body' | undefined;
|
|
71
71
|
/**
|
|
72
72
|
* Custom handler for the submit event, in this case you are responsible for closing the dialog.
|
|
73
73
|
* @example
|
|
@@ -86,7 +86,7 @@ type CreateInDialogButtonProps = PropsWithChildren &
|
|
|
86
86
|
onSubmit?: SubmitFunction;
|
|
87
87
|
};
|
|
88
88
|
function CreateInDialogButton(props: CreateInDialogButtonProps) {
|
|
89
|
-
const { children, maxWidth = 'md', fullWidth = true, fullScreen, onSubmit, mutationOptions, ...rest } = props;
|
|
89
|
+
const { children, maxWidth = 'md', fullWidth = true, fullScreen, onSubmit, mutationOptions, scroll, ...rest } = props;
|
|
90
90
|
const queryClient = useQueryClient();
|
|
91
91
|
const resource = useResourceContext();
|
|
92
92
|
const Child = Children.only(children);
|
|
@@ -124,7 +124,14 @@ function CreateInDialogButton(props: CreateInDialogButtonProps) {
|
|
|
124
124
|
onSuccess: handleSuccess
|
|
125
125
|
}}
|
|
126
126
|
>
|
|
127
|
-
<Dialog
|
|
127
|
+
<Dialog
|
|
128
|
+
open={open}
|
|
129
|
+
scroll={scroll}
|
|
130
|
+
onClose={handleClose}
|
|
131
|
+
maxWidth={maxWidth}
|
|
132
|
+
fullWidth={fullWidth}
|
|
133
|
+
fullScreen={fullScreen}
|
|
134
|
+
>
|
|
128
135
|
{React.isValidElement(Child)
|
|
129
136
|
? React.cloneElement(Child, {
|
|
130
137
|
...Child.props,
|
|
@@ -27,9 +27,10 @@ type EditInDialogButtonProps = PropsWithChildren &
|
|
|
27
27
|
maxWidth: Breakpoint;
|
|
28
28
|
fullWidth?: boolean;
|
|
29
29
|
fullScreen?: boolean;
|
|
30
|
+
scroll: 'paper' | 'body' | undefined;
|
|
30
31
|
};
|
|
31
32
|
function EditInDialogButton(props: EditInDialogButtonProps): JSX.Element {
|
|
32
|
-
const { children, maxWidth = 'md', fullWidth = true, fullScreen, mutationOptions, ...rest } = props;
|
|
33
|
+
const { children, maxWidth = 'md', fullWidth = true, fullScreen, mutationOptions, scroll, ...rest } = props;
|
|
33
34
|
const [open, setOpen] = useState(false);
|
|
34
35
|
const Child = Children.only(children);
|
|
35
36
|
const handleOpen = useCallback(() => setOpen(true), []);
|
|
@@ -56,6 +57,7 @@ function EditInDialogButton(props: EditInDialogButtonProps): JSX.Element {
|
|
|
56
57
|
>
|
|
57
58
|
<Dialog
|
|
58
59
|
open={open}
|
|
60
|
+
scroll={scroll}
|
|
59
61
|
onClose={handleClose}
|
|
60
62
|
fullWidth={fullWidth}
|
|
61
63
|
maxWidth={maxWidth}
|