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

Autocomplete isValueAnObject incorrectly checks for null #1943

Open
alexhisen opened this issue Oct 30, 2020 · 2 comments
Open

Autocomplete isValueAnObject incorrectly checks for null #1943

alexhisen opened this issue Oct 30, 2020 · 2 comments

Comments

@alexhisen
Copy link
Contributor

isValueAnObject() checks typeof value === 'object' which is true for null, so if the component starts out with value of null, it always produces values that are objects, which is unexpected.

@KarimOurrai
Copy link

KarimOurrai commented Jan 27, 2021

Hello
what's the behavior for Autocomplete in this case, because adding testing for null values will just produce the same result for the component.

@alexhisen
Copy link
Contributor Author

The 'return value' of the component can be in different formats depending on the 'incoming value'. If null is not treated as an object, the component will return arrays like it normally does instead of objects, which it only does if the value provided to it is an object to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants