Make getPathToSource configurable as a prop#26
Make getPathToSource configurable as a prop#26dariocravero wants to merge 1 commit intoericclemmons:mainfrom
Conversation
|
ericclemmons
left a comment
There was a problem hiding this comment.
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. :)