formsy / formsy-material-ui

A Formsy compatibility wrapper for Material-UI form components
MIT License
571 stars 149 forks source link

FormsyAutoComplete no longer opens autocomplete menu (formsy-material-ui ^0.6.0) #211

Open charleskoehl opened 7 years ago

charleskoehl commented 7 years ago

To repro, open package.json in the webpack-example, update to the latest formsy and material-ui dependencies, npm install, npm start, and go to localhost:3000. The autocomplete field no longer opens the autocomplete menu when you type a valid character such as "N" or "n".

Here are the dependencies I tried it with:

  "dependencies": {
    "formsy-react": "^0.19.2",
    "formsy-material-ui": "^0.6.0",
    "material-ui": "^0.17.4",
    "react": "^15.5.4",
    "react-dom": "^15.5.4",
    "react-tap-event-plugin": "^2.0.1"
  }
charleskoehl commented 7 years ago

I've narrowed down the cause to line 69 of FormsyAutoComplete.jsx, which overwrites the onChange handler of material-ui/AutoComplete so that it can't open its menu. If I remove line 69, the menu opens when I type the beginning of a valid search string.