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

link inside turbo_frame_tag issue #380

Open
bouaik opened this issue Aug 31, 2022 · 3 comments
Open

link inside turbo_frame_tag issue #380

bouaik opened this issue Aug 31, 2022 · 3 comments

Comments

@bouaik
Copy link

bouaik commented Aug 31, 2022

The link_to is for another page but i get this error in console, Response has no matching turbo-frame id="show_pendings" element
Is data-turbo="false" the only solution in this case ?

<%= turbo_frame_tag "show_pendings" do %>
// a lot of code
<%= link_to "another_path" %>
<%= end %>

@marcoroth
Copy link
Member

Hey @bouaik, if you want to break out of the frame you can also use target="_top" on the link.

Otherwise you need to make sure that the response from "another_path" returns a matching <turbo-frame id="show_pendings ">...</turbo-frame> in it's body.

@bouaik
Copy link
Author

bouaik commented Sep 5, 2022

Thanks @marcoroth, actually both target="_top" and data-turbo="false" makes a full reload of the page, i did found data-turbo-frame="_top", wich solve the problem for this case,

@marcoroth
Copy link
Member

marcoroth commented Sep 5, 2022

Ah my bad, data-turbo-frame="_top" is what I meant. Seems like I confused myself 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants