Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectArrayInput with onCreate fails inside ReferenceArrayInput #7021

Closed
fzaninotto opened this issue Dec 22, 2021 · 0 comments · Fixed by #7030 or #7031
Closed

SelectArrayInput with onCreate fails inside ReferenceArrayInput #7021

fzaninotto opened this issue Dec 22, 2021 · 0 comments · Fixed by #7030 or #7031
Labels

Comments

@fzaninotto
Copy link
Member

What you were expecting:

This code to work:

<ReferenceArrayInput reference="tags" source="tags" label="Tags" filter={{ published: filter }}>
    <SelectArrayInput create={<CreateTag />} optionText="name.en" />
</ReferenceArrayInput>

What happened instead:

image

Note that the error doesn't appear if I remove the <SelectArrayInput create> prop

Steps to reproduce:

I created a CodeSandbox where I replaced AutocompleteArrayInput by SelectArrayInput in the TagReferenceInput

  1. Open https://codesandbox.io/s/magical-ellis-lt8qe?file=/src/posts/TagReferenceInput.tsx
  2. Edit a post
  3. Go to the miscellaneous tab
  4. click on the down arrow of the tags input to reveal the possible coices
  5. The page renders an error

Environment

  • React-admin version: 3.19.4
  • Last version that did not exhibit the issue (if applicable): v3.17.3 (it seems the bug was introduced in 3.18.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant