File tree Expand file tree Collapse file tree 1 file changed +5
-23
lines changed
packages/ra-ui-materialui/src/input/ArrayInput Expand file tree Collapse file tree 1 file changed +5
-23
lines changed Original file line number Diff line number Diff line change @@ -85,23 +85,10 @@ export const ArrayInput = (props: ArrayInputProps) => {
8585 source : arraySource ,
8686 validate,
8787 variant,
88- disabled,
89- readOnly,
9088 margin = 'dense' ,
9189 ...rest
9290 } = props ;
9391
94- if ( disabled ) {
95- throw new Error (
96- '<ArrayInput> does not accept a disabled prop. Set the disabled prop on the SimpleFormIterator and its child inputs instead.'
97- ) ;
98- }
99- if ( readOnly ) {
100- throw new Error (
101- '<ArrayInput> does not accept a readOnly prop. Set the disabled prop on the SimpleFormIterator and make its children inputs readOnly instead.'
102- ) ;
103- }
104-
10592 const formGroupName = useFormGroupContext ( ) ;
10693 const formGroups = useFormGroups ( ) ;
10794 const parentSourceContext = useSourceContext ( ) ;
@@ -257,18 +244,13 @@ export const getArrayInputError = error => {
257244} ;
258245
259246export interface ArrayInputProps
260- extends CommonInputProps ,
261- Omit < FormControlProps , 'defaultValue' | 'onBlur' | 'onChange' > {
247+ extends Omit < CommonInputProps , 'disabled' | 'readOnly' > ,
248+ Omit <
249+ FormControlProps ,
250+ 'defaultValue' | 'disabled' | 'readOnly' | 'onBlur' | 'onChange'
251+ > {
262252 className ?: string ;
263253 children : ReactElement ;
264- /**
265- * @deprecated Set the disabled prop on the SimpleFormIterator and its child inputs instead
266- */
267- disabled ?: boolean ;
268- /**
269- * @deprecated Set the disabled prop on the SimpleFormIterator and its child inputs instead
270- */
271- readOnly ?: boolean ;
272254 isFetching ?: boolean ;
273255 isLoading ?: boolean ;
274256 isPending ?: boolean ;
You can’t perform that action at this time.
0 commit comments