@applica-software-guru/react-admin 1.5.235 → 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/package.json CHANGED
@@ -115,5 +115,5 @@
115
115
  "type": "module",
116
116
  "types": "dist/index.d.ts",
117
117
  "typings": "dist/index.d.ts",
118
- "version": "1.5.235"
118
+ "version": "1.5.237"
119
119
  }
@@ -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 open={open} onClose={handleClose} maxWidth={maxWidth} fullWidth={fullWidth} fullScreen={fullScreen}>
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}
@@ -47,38 +47,40 @@ function LocalizedTextInput(props: ILocalizedTextInputProps) {
47
47
 
48
48
  return (
49
49
  <LabeledInput {...props} helperText={error?.message}>
50
- <Box flex={1}>
51
- {_.map(locales, (l, index) => {
52
- return (
53
- <TextInput
54
- key={index}
55
- {...props}
56
- source={`${source}.${l.locale}`}
57
- sx={{ width: '100%', display: l.locale === locale ? 'inline-flex' : 'none' }}
58
- label={false}
59
- InputProps={{
60
- endAdornment: (
61
- <Chip
62
- label={<Typography variant="button">{locale}</Typography>}
63
- size="small"
64
- onClick={toggle}
65
- color={isMissingLocalizations ? 'warning' : undefined}
66
- />
67
- )
68
- }}
69
- />
70
- );
71
- })}
72
- <Menu
73
- anchorEl={anchorEl}
74
- open={open}
75
- anchorOrigin={ANCHOR_ORIGIN}
76
- transformOrigin={TRANSFORM_ORIGIN}
77
- onClose={handleClose}
78
- >
79
- {MenuItems}
80
- </Menu>
81
- </Box>
50
+ <>
51
+ <Box flex={1}>
52
+ {_.map(locales, (l, index) => {
53
+ return (
54
+ <TextInput
55
+ key={index}
56
+ {...props}
57
+ source={`${source}.${l.locale}`}
58
+ sx={{ width: '100%', display: l.locale === locale ? 'inline-flex' : 'none' }}
59
+ label={false}
60
+ InputProps={{
61
+ endAdornment: (
62
+ <Chip
63
+ label={<Typography variant="button">{locale}</Typography>}
64
+ size="small"
65
+ onClick={toggle}
66
+ color={isMissingLocalizations ? 'warning' : undefined}
67
+ />
68
+ )
69
+ }}
70
+ />
71
+ );
72
+ })}
73
+ <Menu
74
+ anchorEl={anchorEl}
75
+ open={open}
76
+ anchorOrigin={ANCHOR_ORIGIN}
77
+ transformOrigin={TRANSFORM_ORIGIN}
78
+ onClose={handleClose}
79
+ >
80
+ {MenuItems}
81
+ </Menu>
82
+ </Box>
83
+ </>
82
84
  </LabeledInput>
83
85
  );
84
86
  }