mui / mui/material-ui

"disableCloseOnSelect" and disable modifying the value manually

Open
#35,729 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: select support: question
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
Summary 💡

I don't know if it's possible to make a dropdown-like control where we can select a value from a list (and manually typing the value is disabled) and we can also "disableCloseOnSelect".

Examples 🌈

The "disableCloseOnSelect" is possible with autocomplete of Material UI like illustrated in the code:
https://codesandbox.io/s/zealous-herschel-gw3bq4?file=/demo.tsx. However, I would like to disable the possibility to modify the value manually; people can only select the value from the list.

By contrast, Select of Material UI and DropDownMenu disable the possibility of modifying the value manually. However, I tried to add disableCloseOnSelect, it did not work.

Motivation 🔦

Both of the two features are useful. I don't understand why we cannot have both in one control.

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 by comparing the linked Autocomplete demo.tsx with the Select and DropDownMenu index.js examples. Read how the controls handle selection, manual input, and disableCloseOnSelect, then clarify the intended API and interaction behavior. Done means a documented control configuration supports list-only selection while keeping the dropdown open after each selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.