vivid-planet / comet

Comet DXP

Home Page:https://comet-dxp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace react-select with material-ui autocomplete?

fraxachun opened this issue · comments

https://material-ui.com/components/autocomplete/

It's meant to be an improved version of the "react-select" and "downshift" packages.

Only a suggestion, I didn't yet really go into the details...

I took a brief look,
looks really good!

Autocomplete sounds too heavy (just from the name!)

Big thing is how it manages displayed value on load. static-select allows to use a custom (complex) value type and generate the displayed value from it.

Autocomplete seems to have a second value (inputValue): https://material-ui.com/components/autocomplete/#controllable-states for solving this issue. This needs to be tested how it can be integrated into a form.

And what react-admin can do is providing examples how to use autocomplete, and it's up to the application to choose.

I've created a first implementation: #250