mui / mui/material-ui

[Select] Consistency with Autocomplete

Open
#18,136 11 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Equivalent to react-select's isSearchable={false}.
Disables the search functionality, but is still consistently styled.

Examples 🌈

Motivation 🔦

Having consistent styling of searchable and non-searchable selects is a requirement we're currently facing.

This workaround works: https://codesandbox.io/s/material-demo-ok1kg, but it's not exactly pretty.

EDIT:
Updated workaround with readOnly prop on input suggested by @cooperjones: https://codesandbox.io/s/material-demo-vh5lx

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 reading the Material UI Select and Autocomplete component behavior and comparing them with react-select's isSearchable={false} case. Reproduce the reported readOnly workaround, then verify that a non-searchable Select preserves the same styling as a searchable one while disabling search.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
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.