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

Add isDisable status for Dropdown Item #654

Open
valesceva opened this issue Oct 15, 2024 · 2 comments
Open

Add isDisable status for Dropdown Item #654

valesceva opened this issue Oct 15, 2024 · 2 comments
Labels
Dropdown component Label component and hooks related activities enhancement New feature or request

Comments

@valesceva
Copy link

valesceva commented Oct 15, 2024

The feature or bug you are proposing

Add a isDisable prop for DropdownItem, it could look like the disable action for Table

A snippet of code for replicating the issue or showing the proposal usage if applicable

const items: DropdownItem[] = [
{
        label: <FormattedMessage data={'edit.swi'} />,
        id: 'edit',
        icon: <Icon component={PiPencilSimpleLine} size={16} />,
       isDisabled: true
},
    {
      id: 'download',
      label: <FormattedMessage data='download.activity.history' />,
      icon: <Icon component={PiDownloadSimple} size={16} />,
      children: [
        {
          label: <FormattedMessage data={'pdf'} />,
          id: 'pdf',
          icon: <Icon component={PiFilePdf} size={16} />
        },
        {
          label: <FormattedMessage data='json' />,
          id: 'json',
          icon: <Icon component={PiFileJs} size={16} />,
          isDisabled: true
        }
      ]
    }
  ]


<Dropdown items={items} onClick={onClickDropdown} >
<Button />
</Dropdown>

@valesceva valesceva added enhancement New feature or request Dropdown component Label component and hooks related activities labels Oct 15, 2024
@malta895
Copy link
Contributor

Related to #530
FYI @FrankieBortot

@FrankieBortot
Copy link
Contributor

Mmmmm interesting
nice proposal!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dropdown component Label component and hooks related activities enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants