question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Chip] Add "selected" prop

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

Expected Behavior

Chip should have an active prop to set the Chip to be visually active or not.

Current Behavior

Currently, the only way to make a Chip active is to click on it with onClick set.

Steps to Reproduce (for bugs)

Context

Your Environment

Tech Version
Material-UI beta.36
React 16.2.0
browser
etc

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
oliviertassinaricommented, Apr 10, 2021

@vicasas It will need to support all the colors. But it’s for post v5, we shouldn’t work on it now.

2reactions
oliviertassinaricommented, Mar 11, 2018

Did I miss something here? How do I programatically focus the Chip itself?

You need to get a DOM reference to the element and to focus it.

React.findDOMNode(this.theRef).focus();

This documentation section can help too: https://material-ui-next.com/getting-started/faq/#how-can-i-access-the-dom-element-.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Chip] Add "selected" prop · Issue #10610 · mui/material-ui
I have searched the issues of this repository and believe that this is not a duplicate. Expected Behavior Chip should have an active...
Read more >
React Chip component - Material UI - MUI
Chips with the onClick prop defined change appearance on focus, hover, and click. Chips with the onDelete prop defined will display a delete...
Read more >
reactjs - Select with chip input not displaying the selected value
Your Chips don't have children, so nothing is displayed. You can customize this behavior by specifying the renderValue property on Select .
Read more >
Chips | Angular Material
Use <mat-chip-listbox> and <mat-chip-option> for selecting one or many items ... If the user may select more than one option, add the multiple...
Read more >
Chip component — Vuetify
In selects. Selects can use chips to display the selected data. Try adding your own tags below.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found