Trendyol / baklava

Baklava is a design system provided by Trendyol to create a consistent UI/UX for app users.
https://baklava.design/
MIT License
1.26k stars 112 forks source link

[BUG]: BlSplitButton triggering on dropdown click #890

Open BerkinAKKAYA opened 3 months ago

BerkinAKKAYA commented 3 months ago

Issue description

When i click dropdown button, it triggers the main click event. If i click the main button, it triggers the event twice

Reproducing: 1- Create a BlSplitButton with OnBlClick event 2- Click dropdown button

Example Code:

<BlSplitButton
  label="Test"
  onBlClick={() => {
    console.log('click');
  }}
>
  <BlDropdownGroup caption="Actions">
    <BlDropdownItem icon="edit">Edit</BlDropdownItem>
    <BlDropdownItem icon="delete">Delete</BlDropdownItem>
  </BlDropdownGroup>
</BlSplitButton>

Media & Screenshots

https://github.com/Trendyol/baklava/assets/32297518/38f2572d-bd4d-4cd4-af9e-978c0fe78e3e

Baklava Version

3.1.0

Operating system

Priority this issue should have

Medium (should be fixed soon)

Please review the checkboxes that are applicable.