Skip to content

Commit

Permalink
FieldGuesser: props passing to SingleFieldList
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelSuwinski committed Feb 13, 2023
1 parent bf00773 commit 424386a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/FieldGuesser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import type {
NumberFieldProps,
ReferenceArrayFieldProps,
ReferenceFieldProps,
SingleFieldListProps,
TextFieldProps,
UrlFieldProps,
} from 'react-admin';
Expand Down Expand Up @@ -69,7 +70,7 @@ const renderField = (
<ReferenceArrayField
{...(props as ReferenceArrayFieldProps)}
reference={field.reference.name}>
<SingleFieldList>
<SingleFieldList {...(props as SingleFieldListProps)}>
<ChipField source={fieldName} key={fieldName} />
</SingleFieldList>
</ReferenceArrayField>
Expand Down
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import type {
ResourceProps,
ShowProps,
SimpleFormProps,
SingleFieldListProps,
TabbedFormProps,
TextFieldProps,
TextInputProps,
Expand Down Expand Up @@ -452,7 +453,7 @@ export type FieldProps =
| UrlFieldProps
| EmailFieldProps
| ArrayFieldProps
| ReferenceArrayFieldProps
| (ReferenceArrayFieldProps & SingleFieldListProps)
| EnumFieldProps
| ReferenceFieldProps;

Expand Down

0 comments on commit 424386a

Please sign in to comment.