Skip to content

Commit

Permalink
Fix remove FC usage from ArrayInput component
Browse files Browse the repository at this point in the history
  • Loading branch information
asvarcas committed Oct 5, 2021
1 parent dc5f6ab commit ffa3c21
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions packages/ra-ui-materialui/src/input/ArrayInput/ArrayInput.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { cloneElement, Children, FC, ReactElement } from 'react';
import { cloneElement, Children, ReactElement } from 'react';
import PropTypes from 'prop-types';
import {
isRequired,
Expand Down Expand Up @@ -57,23 +57,24 @@ import { ArrayInputContext } from './ArrayInputContext';
*
* @see https://github.com/final-form/react-final-form-arrays
*/
export const ArrayInput: FC<ArrayInputProps> = ({
className,
defaultValue,
label,
loaded,
loading,
children,
helperText,
record,
resource,
source,
validate,
variant,
disabled,
margin = 'dense',
...rest
}) => {
export const ArrayInput = (props: ArrayInputProps) => {
const {
className,
defaultValue,
label,
loaded,
loading,
children,
helperText,
record,
resource,
source,
validate,
variant,
disabled,
margin = 'dense',
...rest
} = props;
const sanitizedValidate = Array.isArray(validate)
? composeSyncValidators(validate)
: validate;
Expand Down

0 comments on commit ffa3c21

Please sign in to comment.