mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.58k stars 32.19k forks source link

[material-ui][Autocomplete] Formik Form with multiple fields triggering all fields to be opened #41756

Closed mor-stampli closed 5 months ago

mor-stampli commented 6 months ago

Steps to reproduce

Link to live example: (required)

Steps: 1. 2. 3.

Current behavior

i am filling a filed with chrome autofill address. all suggested fields that are targeted to autocomplete dropdown field are no opened and the value is not being set.

Expected behavior

value should be .set OR onChange event should be triggered. value is not set nor onChange is triggered

Context

i searched 2 possible solutions online,

  1. disable autoComplete (off) for the autocomplete fields -not working
  2. handle the autofill value - not working

Your environment

npx @mui/envinfo ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```

Search keywords: autofill formik form

danilo-leal commented 6 months ago

Hey, thanks for opening the issue! Could you provide a minimal reproduction? It helps us troubleshoot. A live example would be perfect. This StackBlitz sandbox template may be a good starting point.

mor-stampli commented 6 months ago

@danilo-leal

https://github.com/mui/material-ui/assets/141311053/9e212967-16ec-4bdd-823d-d3dbfd684aa3

Here you can see in the demo that when i am hovering the autofill suggestions, all the autocomplete fields are gets the suggested value. when i am selecting the value from the autofill form, all the drop-downs are being triggered and opened. the value isn't being set off course.

ZeeshanTamboli commented 6 months ago

@mor-stampli We need a code example to better understand the issue. Additionally, I predict that this might be related to Formik. Have you ensured that all field IDs are unique?

github-actions[bot] commented 5 months ago

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.