mui / mui/material-ui

[autocomplete] Add class for component when `multiple` prop is applied

Open
#41,228 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary

It would be nice if we could get a MuiAutocomplete-multiple class added to the Autocomplete root element if the multiple prop is true.

Examples

No response

Motivation

Would allow us to style these separately without introducing our own class names:

<MuiAutocomplete renderInput={(params) => <TextField {...params} />} className={cx({ 'MuiAutocomplete-multiple': isMultiple })} />

Search keywords: multiple autocomplete class

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 at the Autocomplete component and trace how classes are applied to its root element when the multiple prop is enabled. Add the requested MuiAutocomplete-multiple class and verify that it appears only for multiple Autocomplete instances.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.