Open AlanPadi95 opened 11 months ago
Another suggestion to use the dropdown with the modes and priorities is to set the primary
option as a button and the other options in the dropdown when is expanded. Example in Outlook:
This issue is stale because it has been open for 15 days with no activity. If there are no further updates or modifications within the next 15 days, it will be automatically closed.
Hey, guys!
Could you please share any updates on this issue?
The GitHub bot would close the issue if there are not any updates on it.
Thank you all in advance! 🥰
Both this issue and #1746 are pending to be reviewed by the design team.
For now, I am removing the stale
label to prevent it from closing.
Sorry for the inconvenience.
This issue is stale because it has been open for 15 days with no activity. If there are no further updates or modifications within the next 15 days, it will be automatically closed.
Hello again @AlanPadi95!
I'm going to answer both requests:
Is your feature request related to a problem? Please describe. First, we need a way to disable an option without disabling the entire dropdown. Some of the options in the dropdown could be disabled because a user does not have permission to click on them.
Also, we need to show priorities between the different options. In most of our cases, some options are more relevant than others and we need a way to show this importance in an understandable way for the users.
Describe the solution you'd like The solution to disable options is to add a prop
disabled
and make them unable to interact.To implement different priorities for each option in the dropdown, we can use the current implementation of the
mode
prop that we have in the DxcButton, including the new one suggested on [DxcButton] "danger" mode. By default, this mode should be "text" to not change the current approach. Thedanger
mode should show the action on a red background such as in the DxcButton.Describe alternatives you've considered N/A
Additional context An example use case:
The first option should have
primary
as the value of the mode prop and the last option should havedanger
as the value of that prop. The options in the image could be disabled if, for example, a user has permission to edit the resource but not to delete it.Add Labels SaaSOps Automation, CSAM Applications, DxcDropdown.