@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/dist/components/ra-forms/TableForm/TableFormIterator.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +38 -38
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +2257 -2245
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +41 -41
- package/dist/react-admin.umd.js.gz +0 -0
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-forms/TableForm/TableFormIterator.tsx +21 -9
package/package.json
CHANGED
|
@@ -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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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:
|
|
248
|
+
<TableRow sx={{ borderBottom: 0 }} key={member.id}>
|
|
237
249
|
<TableFormIteratorItem
|
|
238
250
|
disableRemove={disableRemove}
|
|
239
251
|
index={index}
|