Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes linkClickHandler not working in inner uses of BasicRichText. #140

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vitorpamplona
Copy link
Contributor

linkClickHandler is not passing around when new BasicRichTexts are instantiated.

I am not sure if this is the correct way of solving it, but this applies the same LocalLinkClickHandler to the entire hierarchy of nodes, not just the first level. It seems better than passing it around to new instances of BasicRichTexts.

FYI, in the demo, the click worked but wasn't handled by the custom handler. It was using the default LocalUriHandler.current.

@halilozercan
Copy link
Owner

First of all thanks for finding this out. I believe there is a simpler solution to this problem that doesn't require us exposing a CompositionLocal.

@vitorpamplona
Copy link
Contributor Author

Frankly, I am not sure a custom handler is needed. I have specific needs to intercept it, but maybe the average user is ok on having just the LocalUriHandler.current

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.

None yet

2 participants