-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Chip] Rename onDelete and deleteIcon #16097
Comments
@MrXyfir Do you have an example of use case? |
@oliviertassinari Sure, so for example, how I'm currently using it: A Chip represents data that can be acted upon, but in my case there are multiple possible actions, which I indicate through the primary icon. The default action is determined automatically, but the user can optionally click the secondary action to "explode" the chip into multiple others, each chip representing a different action on that original piece of data. That probably makes no sense. Here's a hypothetical instead: The Chip represents a tag you attach to another object in your app for organizational purposes. Clicking the tag adds or removes it. Clicking the secondary action views all objects linked to it, or maybe stars the tag so it shows first in the list, or opens a modal displaying metadata about it. |
I have added the v5 milestone, at least so we don't forget about considering your proposal. |
In the docs it's mentioned that
In my opinion, those specific I'd like to work on this issue btw. @oliviertassinari |
@alewis729 interesting, maybe we need an |
Even the docs show
onDelete
anddeleteIcon
used for purposes other than deleting the Chip. I'd imagine it's common to use them for other purposes.I propose renaming them to
onSecondaryAction
andsecondaryIcon
, or something similar. The current attributes could be aliases for those so as to not be a breaking change, at least for v4.The text was updated successfully, but these errors were encountered: