Skip to content

useButton should accept and pass continuePropagation to the usePress hook. #6157

Open
@pedroapfilho

Description

@pedroapfilho

Provide a general summary of the feature here

Pass continuePropagation to useButton, and pass it down to usePress, so the Buttons created with useButton can have events propagated to parents with the onPress.

🤔 Expected Behavior?

continuePropagation should be a prop for useButton, that should be passed to usePress

😯 Current Behavior

Currently there's no way to pass continuePropagation to the useButton, so it can be used by usePress.

💁 Possible Solution

I saw the implementation of useButton, and saw that it uses usePress, and that usePress has continuePropagation, but it's not used by useButton. so my proposal is to pass the continuePropagation to useButton and pass it down to usePress, so everything works as expected on these edge cases.

🔦 Context

We currently use the useButton to create part of our design system, and there are some cases when we use our button with other libraries eg: flexlayout-react, and the library expects the event to bubble to their own button, so the event can be triggered.

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions