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

[base-ui][Switch] Input checked attribute does not update #40619

Closed
DiegoAndai opened this issue Jan 15, 2024 · 4 comments
Closed

[base-ui][Switch] Input checked attribute does not update #40619

DiegoAndai opened this issue Jan 15, 2024 · 4 comments
Labels
bug 🐛 Something doesn't work component: switch This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base

Comments

@DiegoAndai
Copy link
Member

DiegoAndai commented Jan 15, 2024

Steps to reproduce

Link to live example: https://mui.com/base-ui/react-switch/

Current behavior

When toggling the switch components, the checked property on the inner input does not update accordingly.

Expected behavior

The checked property should update.

Your environment

npx @mui/envinfo
  System:
    OS: macOS 13.4.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 344.23 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
    pnpm: 8.13.1 - ~/.nvm/versions/node/v18.19.0/bin/pnpm
  Managers:
    Homebrew: 4.2.0 - /usr/local/bin/brew
    pip3: 21.2.4 - /usr/bin/pip3
    RubyGems: 3.0.3.1 - /usr/bin/gem
  Utilities:
    Make: 3.81 - /usr/bin/make
    GCC: 14.0.3 - /usr/bin/gcc
    Git: 2.39.2 - /usr/bin/git
    Clang: 14.0.3 - /usr/bin/clang
    Curl: 7.88.1 - /usr/bin/curl
  Servers:
    Apache: 2.4.56 - /usr/sbin/apachectl
  IDEs:
    VSCode: 1.85.1 - /usr/local/bin/code
    Vim: 9.0 - /usr/bin/vim
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Perl: 5.30.3 - /usr/bin/perl
    Python3: 3.9.6 - /usr/bin/python3
    Ruby: 2.6.10 - /usr/bin/ruby
  Databases:
    SQLite: 3.39.5 - /usr/bin/sqlite3
  Browsers:
    Chrome: 120.0.6099.216
    Safari: 16.5.1
  Monorepos:
    Lerna: 8.0.2

Search keywords: switch base-ui checked

@DiegoAndai DiegoAndai added bug 🐛 Something doesn't work component: switch This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels Jan 15, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Base UI Jan 15, 2024
@ANUGLYPLUGIN
Copy link
Contributor

@DiegoAndai Excuse me can I take these? I find another problem with the live example.

@DiegoAndai
Copy link
Member Author

@ANUGLYPLUGIN sure, go ahead. If you found another problem that is not closely related, I would prefer that we have a separate issue and PR for that one, please 😊.

@ANUGLYPLUGIN
Copy link
Contributor

@DiegoAndai OK thanks, what I mentioned above is actually an doc issue. I have raised and have been completed.
And do you mean checked prop should appear in <input checked /> when it is checked ? I think checked attribute is an default state and toggle will not change the value.

@DiegoAndai
Copy link
Member Author

You're correct: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#checked

My bad, closing this one 😅

@DiegoAndai DiegoAndai closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Base UI Jan 16, 2024
@michaldudak michaldudak removed this from Base UI Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: switch This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base
Projects
None yet
Development

No branches or pull requests

2 participants