Skip to content

Conversation

Wriklend
Copy link

Currently, the Button component in TelegramUI uses a Tappable under the hood, which relies on onPointerDown and onPointerCancel for the ripple effect via the useRipple hook.

But since the Button doesn't explicitly support onPointerDown and onPointerUp props, there's no clean way to hook into these events from the outside. And even if you try to pass them manually through restProps, they end up replacing the internal handlers — which breaks the ripple effect.

@Wriklend
Copy link
Author

Closes #102

)}
onPointerCancel={onPointerCancel}
onPointerDown={onPointerDown}
onPointerCancel={handlePointerCancel}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your issue and contribution!
It would be preferred to use function callMultiple

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mainsmirnov yep, good one

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

Successfully merging this pull request may close these issues.

2 participants