Questions tagged [turbo-frames]

47 questions
11
votes
8 answers

Link to turbo frame not working, navigating full page instead

I have the following code: <%= turbo_frame_tag :my_frame do %> frame <% end %> <%= link_to "About", about_path, data: { turbo_frame: :my_frame } %> When I click the "About" link, the frame's content doesn't get updated. Instead, the whole page…
Jason Swett
  • 43,526
  • 67
  • 220
  • 351
8
votes
3 answers

Getting a Turbo Frame Error of "Content Missing"

I'm trying to use turbo_frame_tag in my Rails application to manage some tasks. I created a scaffold for my tasks. I wrapped the page I want to use inside of a turbo frame tag as below: <%= turbo_frame_tag "modal" do %>

New task

8
votes
1 answer

How can I execute JavaScript when a new Turbo Frame is loaded

I am using Turbo Frames in my Rails app and have, on every page This loads in fine, and when a link is clicked replaces the frame as expected. In this frame I have set overflow-y: scroll,…
tsvallender
  • 2,615
  • 6
  • 32
  • 42
5
votes
2 answers

Using Turbo Frames How Can I Reload The Whole Page If The Form Submited Succeeded?

I have 1: a link in a turbo frame which loads a form into the same frame. Working Well 2: the form if it is not valid then should only update itself by marking the missing fields with errrors. Working Well 3: in case the form submission is…
Boti
  • 3,275
  • 1
  • 29
  • 54
5
votes
1 answer

Refresh Turbo Frames with a select without submitting on Rails 7

I'm learning Turbo Frames and Streams + Stimulus so it's possible I'm not 100% on track. I have a form for creating a new object, but within the form I'd like to have a select component that will display certain fields depending on the selection.…
5
votes
1 answer

Inline Devise Signup form using Turbo Frames

I'm having trouble setting up a Devise sign-up form using Turbo Frames. I'd like to have the Devise sign up form set up as a "gradual engagement" form that only requires email to register the new user from the homepage. Here's how I've set this up…
Lee McAlilly
  • 9,084
  • 12
  • 60
  • 94
4
votes
1 answer

In rails, Turbo just appends the response from the server at the end of current page

The problem: Turbo just appends the response from server to the end of current page. Not replacing the page like expected. Recently upgraded from Rails 6 to 7. Also I switched from importmap to esbuild. I have a form that is making a post to a…
JUlinder
  • 995
  • 1
  • 8
  • 19
4
votes
1 answer

Use Stimulus Controller in multiple places

I want to be able to use a Stimulus Controller in multiple places in a web app. I want do something like this:
Rafael Mora
  • 1,095
  • 2
  • 13
  • 21
3
votes
1 answer

Finding the current URL or "main" controller from within a Turbo Frame in Rails

I have a Turbo Frame on my page which uses the src attribute to load in /chats/. Within this frame I want to be able to know whether the main page is using the show action of the groups controller, i.e. the URL of the page is at…
tsvallender
  • 2,615
  • 6
  • 32
  • 42
3
votes
2 answers

Rails: turbo-frame with src requested interpreted as format.html

I've noticed this strange behavior of turbo frames loading lazily via src attribute setting: nav = turbo_frame_tag 'primary_menu', src: primary_menu_path : def primary_menu : respond_to do |format| : format.turbo_stream > : …
BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
3
votes
1 answer

Hotwire Turbo does not replace turbo-frame

I have a form
KingOfCoders
  • 2,253
  • 2
  • 23
  • 34
2
votes
2 answers

Infinite scroll pagination and filter with hotwire

I have a table with infinite scroll working perfectly without reloading entire page. I'm now having issues with adding filter. Thanks to Phil Reynolds' article https://purpleriver.dev/posts/2022/hotwire-handbook-part-2 I was able to implement…
2
votes
1 answer

data-autoscroll-block "start" position of turbo_frame option is misaligned

I would like to use the data-autoscroll-block attribute described in Turbo Reference to set the scroll position to TOP when screen transitions by turbo_frame, but it is not completely at the top position. Since the navbar is sticky, I'm guessing…
mojaomi
  • 115
  • 6
2
votes
1 answer

RoR, page not updating with Turbo_stream DELETE in a turbo_frame

My repo: https://github.com/czepesch/gloss (turboframes-dev branch) I have a list of entries in a glossary. Problem with delete action. Entry is deleted but page not reloading\entry not removing automatically. (same delete action working without…
Alexander V
  • 45
  • 1
  • 5
2
votes
1 answer

how can I reload a single turbo frame and update the url?

I have tried to make a minimal example that doesn't involve any specific server side technology. So I have just generate the webpage with bash and serve it with cgi. $ mkdir example $ cd example $ cat > index.html
Alex028502
  • 3,486
  • 2
  • 23
  • 50
1
2 3 4