Skip to content

Duplicated @update:open event on controlled drawerΒ #113

Description

@luizotcarvalho

πŸ› Bug Report

When using a controlled DrawerRoot component, the @update:open event is fired twice when the drawer is closed by clicking on the overlay.

This can lead to unexpected side effects such as triggering state updates twice.

Reka UI Dialog works as expected and emits the event only once, as shown in this working example: πŸ‘‰ Reka UI Reproduction.

πŸ§ͺ Reproduction

You can reproduce the issue here:
πŸ‘‰ StackBlitz Reproduction

Steps to reproduce:

  1. Open the drawer.
  2. Click on the overlay to close it.
  3. Check the console.

🧠 Expected Behavior

The @update:open event should only be emitted once when the drawer is closed or opened.

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