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

Dropdown: "disabled" attribute does not work when "renderTrigger" #1528

Open
tomphan opened this issue Jan 31, 2025 · 0 comments
Open

Dropdown: "disabled" attribute does not work when "renderTrigger" #1528

tomphan opened this issue Jan 31, 2025 · 0 comments

Comments

@tomphan
Copy link

tomphan commented Jan 31, 2025

  • [x ] I have searched the Issues to see if this bug has already been reported
  • [ x] I have tested the latest version

Steps to reproduce

I would want to have a custom span button, with dropdown attached.
Try this code:

return (
      <Dropdown label="Dropdown button" disabled={true} renderTrigger={() => 
      <span>[Custom Button]</span>

      }>
        <Dropdown.Item>Dashboard</Dropdown.Item>
        <Dropdown.Item>Settings</Dropdown.Item>
        <Dropdown.Item>Earnings</Dropdown.Item>
        <Dropdown.Item>Sign out</Dropdown.Item>
      </Dropdown>
    );

Current behavior

In case disabled = {true}, the dropdown still appears when clicking.

Expected behavior

In case disabled = {true}, the dropdown should not appear.

Context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant