@applica-software-guru/react-admin 1.5.291 → 1.5.293
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 +42 -42
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +2256 -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 +20 -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,17 @@ 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
|
+
}
|
|
152
|
+
: {
|
|
153
|
+
mt: 2,
|
|
154
|
+
border: `1px solid ${tableBorderColor}`,
|
|
155
|
+
//@ts-ignore
|
|
156
|
+
boxShadow: theme.customShadows.z0
|
|
157
|
+
};
|
|
146
158
|
|
|
147
159
|
return fields ? (
|
|
148
160
|
// @ts-ignore
|
|
@@ -162,13 +174,12 @@ function RawTableFormIterator(props: TableFormIteratorProps): ReactElement | nul
|
|
|
162
174
|
|
|
163
175
|
<TableContainer
|
|
164
176
|
component={Paper}
|
|
165
|
-
sx={
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
177
|
+
sx={{
|
|
178
|
+
...basicStyles,
|
|
179
|
+
//@ts-ignore
|
|
180
|
+
boxShadow: theme.customShadows.z0,
|
|
181
|
+
...sx
|
|
182
|
+
}}
|
|
172
183
|
>
|
|
173
184
|
<Table size="small">
|
|
174
185
|
<TableHead sx={inset === true ? {} : { borderTop: 0, borderBottom: `1px solid ${tableBorderColor}` }}>
|
|
@@ -233,7 +244,7 @@ function RawTableFormIterator(props: TableFormIteratorProps): ReactElement | nul
|
|
|
233
244
|
|
|
234
245
|
{fields.length > 0 &&
|
|
235
246
|
fields.map((member: any, index: number) => (
|
|
236
|
-
<TableRow sx={{ borderBottom:
|
|
247
|
+
<TableRow sx={{ borderBottom: 0 }} key={member.id}>
|
|
237
248
|
<TableFormIteratorItem
|
|
238
249
|
disableRemove={disableRemove}
|
|
239
250
|
index={index}
|