Closed JbPons closed 4 years ago
Hi,
I tested your example with skills being an empty array and didn´t get any error:
const initialValues = { username: "", gender: "", country: "", skills: [], birthdate: null };
Does it solve your problem?
Hello,
Yes it's solve my problem, Thanks.
But I think the library need to be update to handle the case I described in my previous commentary.
So, I don't close the issue to wait any update from the contributor.
Hello. Thank you both for your comments.
I agree with @JbPons. null
initial value should be handled properly.
Version 0.6.3 prints an error message in the console when the value is null
and does not render the field.
This issue is related to a previous fixed issue : #28
Now, with the last version of the Library I can't use autoComplete with multiple option without initialValue.
So I try to do:
skills: null
andskills: [null]
I have a react error,.After that I try in another way:
skills: [{ label: '', value: ''}]
This time it's work but I have an empty selected options.You can find a working example here : https://codesandbox.io/s/nifty-turing-36dvv