-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bug: 3.13.0 causes strange behaviour with ReferenceArrayInputs inside of ArrayInputs #5968
Comments
Note, everything works perfectly fine in my project when i provide the |
1- Major issue, I can't use the ReferenceArrayInput component with the "AutocompleteArrayInput" component in it. It keeps throwing and error on this file "ra-core/esm/controller/input/useReferenceArrayInputController.js" at line 125. This is the exception "useReferenceArrayInputController.js:125 Uncaught TypeError: newIds.forEach is not a function". Need to convert newIds to an array in order to use the forEach function. |
Funnily enough, I came across this when trying to come up with a repro case for my issue. Eventually it went away, but I don't know how I caused it, or why it was fixed. |
@andrico1234 Thanks for the report. Your fork doesn't seem to have any difference with the main repository though. Would you mind updating it? |
Thanks, I reproduced it locally and made a PR to fix it |
This one was a pain to repro and find a workaround for. 😅
I couldn't recreate it on the Codesandbox so I made a branch for it. It can be found at repro/break-ra To run the repro, you'll need to run
make run-simple
and then navigate to the PostEdit screen.This broke with the latest version of RA: 3.13.0. I imagine this has something to do with the addition of the
ListContext
toReferenceArrayInput
. I might be wrong though.Basically I don't know why this happens, but when I pass through the same
/basePath
present in theEdit
component everything works totally fine. When I wrap theReferencyArrayInput
in aFormDataConsumer
thebasePath
in the...rest
inside of theArrayInput
was undefined (but this was the case for earlier versions). So I can only imagine thatReferenceArrayInputs
lost this value with the addition of the newListContext
. 🤷I know the last sentence was hella complicated, but I hope I was clear enough.
Code Snippet
Error Trace
The text was updated successfully, but these errors were encountered: