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

[4.0.0-alpha.2]: MUI warning when using AutocompleteInput #7061

Closed
wattroll opened this issue Jan 7, 2022 · 4 comments
Closed

[4.0.0-alpha.2]: MUI warning when using AutocompleteInput #7061

wattroll opened this issue Jan 7, 2022 · 4 comments
Labels

Comments

@wattroll
Copy link

wattroll commented Jan 7, 2022

What you were expecting:
Use AutocompleteInput without warnings.

What happened instead:

Warning in the console

MUI: The value provided to Autocomplete is invalid. None of the options match with `""`. You can use the `isOptionEqualToValue` prop to customize the equality test.

Note the "", probably that's the offending part.

Steps to reproduce:
Seems to appear in pretty much any AutocompleteInput. Can be seen at posters galore demo, e.g. by going to Orders resource and adding a Customer filter.


I bisected it down to this commit:

7de027dce7c3dff1fa11ca1210dfc7f7083b8858 is the first bad commit
commit 7de027dce7c3dff1fa11ca1210dfc7f7083b8858
Author: Travis CI <travis@travis-ci.org>
Date:   Wed Dec 15 14:44:42 2021 +0100

    Merge both autocomplete

I haven't managed to spot the cause of a problem by a quick look-through. @djhi, would you have time to have a look at this? 🙏

@WiXSL
Copy link
Contributor

WiXSL commented Jan 10, 2022

I couldn't reproduce the error you describe in the demo.
Could you provide a code sandbox or a repo to reproduce it?

@wattroll
Copy link
Author

wattroll commented Jan 10, 2022

Thanks for having a look at it, and sorry for an incomplete bug report.

I tried, but haven't yet managed to setup a codesandbox against next. I'll get back to it soon

In the meanwhile I made sure that I can reproduce locally in a demo with a fresh checkout:

  1. git clone 'https://github.com/marmelab/react-admin.git'
  2. cd react-admin/
  3. git checkout next
  4. make build
  5. make run-demo
  6. Open http://localhost:3000/#/commands
  7. Click "Add filter" > "Customer"

2022-01-10-140216_1920x1080_scrot

@WiXSL
Copy link
Contributor

WiXSL commented Jan 10, 2022

Ok, now I could reproduce it.
Thank you for the details.
We're going to look into it.

@WiXSL WiXSL added the bug label Jan 10, 2022
@WiXSL WiXSL changed the title next: MUI warning when using AutocompleteInput [4.0.0-alpha.2]: MUI warning when using AutocompleteInput Jan 10, 2022
@WiXSL
Copy link
Contributor

WiXSL commented Jan 20, 2022

Fixed by #7098

@WiXSL WiXSL closed this as completed Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants