You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classMessage < ApplicationRecordincludeTurbo::Streams::ActionHelperincludeTurbo::Streams::StreamNamebelongs_to:conversationafter_create_commit:broadcast_message_in_conversationdefbroadcast_message_in_conversationbroadcast_append_to([conversation,:messages],partial: "/conversations/message",locals: {message: self},target: dom_id(conversation,:messages),)# I want to scroll to the bottom of the conversation after the new message is rendered.content=turbo_stream_action_tag:scroll_into_view,target: dom_id(self,:container)ActionCable.server.broadcast(stream_name_from(self),content)endend
app/views/conversations/_message.rb
<%= tag.divid: dom_id(message,:container) %>
<pclass="message"><%= sanitize(message.message) %></p>
<% end %>
The above has no errors but doesn't scroll to the bottom.
Any thoughts?
Thank you in advance
Note - this issue was created on turbo_power before but I think this issue is more fit here.
The text was updated successfully, but these errors were encountered:
Hello
Thank you for working on
turbo_power
💪I want to accomplish this:
app/models/message.rb
app/views/conversations/_message.rb
The above has no errors but doesn't scroll to the bottom.
Any thoughts?
Thank you in advance
Note - this issue was created on
turbo_power
before but I think this issue is more fit here.The text was updated successfully, but these errors were encountered: