-
Notifications
You must be signed in to change notification settings - Fork 75
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
Make getPathToSource configurable as a prop #26
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this PR!
Do you think #29 and this have some overlap?
getPathToSource
addresses your need, while #29 wants to avoid the default window.open
behavior.
It sounds like a handler like onOpenComponent({ editor, source })
would let you craft the correct URL and open it?
(But then you'd be responsible for window.open
🤔 )
Now that I type it out, this PR makes sense on it's own I think :D
Ok, let me get back to reviewing!
Let's roll with |
Yeah, I think it's grand :)
…On Thu, Apr 28, 2022 at 5:19 PM Alexander Kotliarskyi < ***@***.***> wrote:
Let's roll with onOpenComponent? The downside that the user of this code
would have to format the file path and call window.open themselves but I
think it's okay, just a more advanced option. I'll update the PR
—
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC33TCT5U5VTZSVXBIGP3DVHKUBPANCNFSM5UPU4AEQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
We have a use case in which some of our React components are actually morphed from another file type. By exposing that prop we can replace the file name and open the real source instead.
Thanks for making this component! It's super handy. :)