mui / mui/material-ui

[material-ui][Select] Adding `<fieldset disabled>` doesn't disable it

Open
#39,634 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: select type: enhancement
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/friendly-dijkstra-g62dv9?file=/src/Demo.js

Steps:

  1. add "disabled" to a surrounding a select component
Current behavior 😯

The form element is active

Expected behavior 🤔

Form element should be disabled like the rest of the elements when the fieldset is marked disabled

Context 🔦

I need to disable all form elements on page with a huge form.

I think I'm also supposed to mention we have a license: Order #72705

Your environment 🌎
npx @mui/envinfo
  System:
    OS: macOS 14.0
  Binaries:
    Node: 20.3.0 - ~/.nvm/versions/node/v20.3.0/bin/node
    Yarn: 3.2.2 - /opt/homebrew/bin/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v20.3.0/bin/npm
  Browsers:
    Chrome: 118.0.5993.70
    Edge: Not Found
    Safari: 17.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction and its src/Demo.js file, then inspect the Material UI Select implementation and existing tests for disabled form behavior. Reproduce the case with a disabled fieldset and verify that the Select is inactive when the fieldset is disabled, while existing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript, react
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.