@applica-software-guru/react-admin 1.5.291 → 1.5.294

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
@@ -106,5 +106,5 @@
106
106
  "type": "module",
107
107
  "types": "dist/index.d.ts",
108
108
  "typings": "dist/index.d.ts",
109
- "version": "1.5.291"
109
+ "version": "1.5.294"
110
110
  }
@@ -54,7 +54,8 @@ function RawTableFormIterator(props: TableFormIteratorProps): ReactElement | nul
54
54
  empty,
55
55
  template = {},
56
56
  addButton = <AddTableRow />,
57
- inset
57
+ inset,
58
+ sx
58
59
  } = props;
59
60
  const [confirmIsOpen, setConfirmIsOpen] = useState<boolean>(false);
60
61
  const { fields, remove, replace, append } = useArrayInput(props);
@@ -143,6 +144,18 @@ function RawTableFormIterator(props: TableFormIteratorProps): ReactElement | nul
143
144
  // @ts-ignore
144
145
  const tableBorderColor = theme.palette.mode === 'dark' ? theme.palette.grey.A400 : theme.palette.grey.A800;
145
146
  const showClearAllButton = fields.length > 0 && enableClearAll;
147
+ const basicStyles =
148
+ inset === true
149
+ ? {
150
+ borderRadius: 0,
151
+ borderBottom: `1px solid ${theme.palette.divider}`
152
+ }
153
+ : {
154
+ mt: 2,
155
+ border: `1px solid ${tableBorderColor}`,
156
+ //@ts-ignore
157
+ boxShadow: theme.customShadows.z0
158
+ };
146
159
 
147
160
  return fields ? (
148
161
  // @ts-ignore
@@ -162,13 +175,12 @@ function RawTableFormIterator(props: TableFormIteratorProps): ReactElement | nul
162
175
 
163
176
  <TableContainer
164
177
  component={Paper}
165
- sx={
166
- inset === true
167
- ? {
168
- borderRadius: 0
169
- }
170
- : { mt: 2, border: `1px solid ${tableBorderColor}` }
171
- }
178
+ sx={{
179
+ ...basicStyles,
180
+ //@ts-ignore
181
+ boxShadow: theme.customShadows.z0,
182
+ ...sx
183
+ }}
172
184
  >
173
185
  <Table size="small">
174
186
  <TableHead sx={inset === true ? {} : { borderTop: 0, borderBottom: `1px solid ${tableBorderColor}` }}>
@@ -233,7 +245,7 @@ function RawTableFormIterator(props: TableFormIteratorProps): ReactElement | nul
233
245
 
234
246
  {fields.length > 0 &&
235
247
  fields.map((member: any, index: number) => (
236
- <TableRow sx={{ borderBottom: `1px solid ${tableBorderColor}}` }} key={member.id}>
248
+ <TableRow sx={{ borderBottom: 0 }} key={member.id}>
237
249
  <TableFormIteratorItem
238
250
  disableRemove={disableRemove}
239
251
  index={index}