Skip to content

OnToggle on Dropdown does not trigger #1617

Description

@finn-rapid-data
  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

Steps to reproduce

  1. Create a client component with Next.js.
  2. Add the Flowbite dropdown and pass an onToggle or onClick function like this:
<FlowbiteDropdown
            onClick={() => console.log('cliock')}
            onToggle={(e) => console.log('toggle', e)}
            label="test"
          >
            <DropdownItem>test123</DropdownItem>
          </FlowbiteDropdown>

Current behavior

The event callbacks are not triggered.

Expected behavior

The console log appears.

Context

I want to create a basic useState hook to know programmatically whether the dropdown is open or not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions