Skip to content

Commit 6be804c

Browse files
committed
Remove unnecessary props
1 parent 78da761 commit 6be804c

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

packages/ra-core/src/controller/input/ArrayInputBase.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ export const ArrayInputBase = (props: ArrayInputBaseProps) => {
5858
const {
5959
children,
6060
defaultValue = [],
61-
isPending,
62-
loading,
6361
resource: resourceFromProps,
6462
source: arraySource,
6563
validate,
@@ -153,10 +151,6 @@ export const ArrayInputBase = (props: ArrayInputBaseProps) => {
153151
[parentSourceContext, arraySource]
154152
);
155153

156-
if (isPending && loading !== undefined && loading !== false) {
157-
return loading;
158-
}
159-
160154
return (
161155
<ArrayInputContext.Provider value={fieldProps}>
162156
<OptionalResourceContextProvider value={resourceFromProps}>
@@ -178,8 +172,4 @@ export const getArrayInputError = error => {
178172
export interface ArrayInputBaseProps
179173
extends Omit<InputProps, 'disabled' | 'readOnly'> {
180174
children: ReactNode;
181-
loading?: ReactNode;
182-
isFetching?: boolean;
183-
isLoading?: boolean;
184-
isPending?: boolean;
185175
}

packages/ra-ui-materialui/src/input/ArrayInput/ArrayInput.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ export interface ArrayInputProps
160160
| 'onChange'
161161
> {
162162
className?: string;
163+
loading?: React.ReactNode;
164+
isFetching?: boolean;
165+
isLoading?: boolean;
166+
isPending?: boolean;
163167
}
164168

165169
const PREFIX = 'RaArrayInput';

0 commit comments

Comments
 (0)