-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Using parse/format with AutoCompleteArrayInput and ReferenceArrayInput #4454
Comments
Same issue here. Move |
Oh, does each tag is an object rather than just the id. If so, you and I have the exact problem. My solution is this:
Since |
When I saw this line I tried to change just the values of the elements in the array and not the reference of the array but that meant by the end of it, the value in the form was never the "parsed" value and always the "formatted" one. If I simply load a |
Did you try putting |
@ttlong3103 I did try it. No luck. |
I'm using a
ReferenceArrayInput
withAutocompleteArrayInput
as its child and usingparse
andformat
on theReferenceArrayInput
.If the field already has a value, I cannot type into the autocomplete input for it to filter my results.
It seems to just take my first character and then just clear the filter value, meaning I cannot search on a string with more than one character.
Steps to reproduce:
Using this code sandbox:
AutocompleteArrayInput
.https://codesandbox.io/s/billowing-fire-zqytt
Other information:
There exists this other issue that happens to use the exact same components with the
parse/format
props. While that issue has been resolved, I feel that I might be missing something otherwise @Bnaya would have noticed this exact issue I'm reporting here.I feel this issue could have to do with this line which clears the filter when
input.value
changes. And consideringinput.value
is an array and it changes in my exampleformat
function (format={v => v && v.map(x => x._id)}
) as I always return a new array, I thinkhandleFilterChange('');
always gets called. But I haven't looked too much into this. Just a guess.Environment
The text was updated successfully, but these errors were encountered: