Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Autocomplete] Add new ChipProps prop #18885

Closed
1 task done
akrigline opened this issue Dec 16, 2019 · 4 comments · Fixed by #18917
Closed
1 task done

[Autocomplete] Add new ChipProps prop #18885

akrigline opened this issue Dec 16, 2019 · 4 comments · Fixed by #18917
Labels
component: autocomplete This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process. new feature New feature or request

Comments

@akrigline
Copy link

akrigline commented Dec 16, 2019

Currently there is no ChipProps or similar in the Autocomplete props api. It would be nice to have the ability to define the Chip variant or color within an Autocomplete.

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

Summary 💡

A subset of Chip Props should be definable on the Autocomplete component. At minimum the following:

  • variant
  • color
  • classes

Examples 🌈

I don't know of any examples showing this behavior.

Motivation 🔦

I'm trying to set the chip variant to be different than the default one and am unable to at the moment.

@oliviertassinari
Copy link
Member

What's wrong with the renderTags API?

@jbromberg
Copy link

I have a similar issue. I am using the renderTags prop within the Autocomplete component in order to render Chips. Within the Chips component, basic props like variant work however the onDelete prop does not seem to be working even for a simple console log.

This is frustrating as I am trying to update my state when a Chip is deleted from the Autocomplete input field however it is not working.

@akrigline
Copy link
Author

What's wrong with the renderTags API?

I guess that's a solution. It's annoying that everything about the default behavior is correct except for the default props of the Chip component used though. It would be ideal to be able to define ChipProps similar to how one can define InputProps in TextField.

@oliviertassinari
Copy link
Member

@akrigline Yeah, this sounds fair. We have recently added a ListboxProps (#18822). We could continue with a ChipProps. I'm not a fan of doing such, but the component is still in the lab, if we find a better approach in the future, we will be able to change it. Feel free to submit a pull request :).

@oliviertassinari oliviertassinari added new feature New feature or request good first issue Great for first contributions. Enable to learn the contribution process. component: autocomplete This is the name of the generic UI component, not the React module! labels Dec 17, 2019
@oliviertassinari oliviertassinari changed the title Allow Chip Props to be defined in Autocomplete [Autocomplete] Add new ChipProps prop Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process. new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants