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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[base-ui][material-ui] Uncontrolled Autocomplete component do not fully reset when inside a <form> with a reset button #40252

Open
2 tasks done
aayush-makwana opened this issue Dec 20, 2023 · 1 comment
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature package: base-ui Specific to @mui/base package: material-ui Specific to @mui/material

Comments

@aayush-makwana
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 馃暪

Link to live example without using state: https://codesandbox.io/p/sandbox/jovial-hodgkin-rczprx

Link to live example using state: https://codesandbox.io/p/sandbox/admiring-morse-s67ssl

Current behavior 馃槸

When using Autocomplete component, Pressing the reset button in a form does not revert value of the Autocomplete to its default value.

If I use Autocomplete with state then it will work properly.

Expected behavior 馃

Changes in the value of the Autocomplete will get reset while clicking on the reset button when we are not using the state (for the first codesandbox).

Context 馃敠

No response

Your environment 馃寧

npx @mui/envinfo
  System:
    OS: Windows 10 10.0.19045
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Chromium (120.0.2210.77)
  npmPackages:
    @emotion/react: ^11.11.1 => 11.11.1
    @emotion/styled: ^11.11.0 => 11.11.0
    @mui/base:  5.0.0-beta.28
    @mui/core-downloads-tracker:  5.15.1
    @mui/material: ^5.15.1 => 5.15.1
    @mui/private-theming:  5.15.1
    @mui/styled-engine:  5.15.1
    @mui/system:  5.15.1
    @mui/types:  7.2.11
    @mui/utils:  5.15.1
    @types/react: ^18.2.45 => 18.2.45
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0
    typescript: ^4.9.5 => 4.9.5
@aayush-makwana aayush-makwana added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 20, 2023
@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Dec 20, 2023
@danilo-leal danilo-leal changed the title Uncontrolled Autocomplete component do not fully reset when inside a <form> with a reset button [material-ui] Uncontrolled Autocomplete component do not fully reset when inside a <form> with a reset button Dec 25, 2023
@danilo-leal danilo-leal added the package: material-ui Specific to @mui/material label Dec 25, 2023
@DiegoAndai DiegoAndai changed the title [material-ui] Uncontrolled Autocomplete component do not fully reset when inside a <form> with a reset button [base-ui][material-ui] Uncontrolled Autocomplete component do not fully reset when inside a <form> with a reset button Feb 5, 2024
@DiegoAndai DiegoAndai added package: base-ui Specific to @mui/base enhancement This is not a bug, nor a new feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 5, 2024
@DiegoAndai
Copy link
Member

This should be supported in Base UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature package: base-ui Specific to @mui/base package: material-ui Specific to @mui/material
Projects
None yet
Development

No branches or pull requests

5 participants