-
Notifications
You must be signed in to change notification settings - Fork 485
Closed
Description
Steps to reproduce
- Create a component that includes both a standard template and a variant.
- Load a page showing the component
- Submit a form
- In the receiving controller, set the variant, then respond using a turbo stream
Expected behavior
The variant version of the component should be shown
Actual behavior
The default template is rendered
Example repo
This repo includes the recommended HomeController. The root page has 2 buttons, "Request Turbo Drive response" and "Request Turbo Stream response". Both buttons submit a form HomeController#create and in both cases the action sets request.variant = :compact.
The difference, however, is that the Turbo Drive version returns the compact variant, while the Turbo Streams version returns the default template. The page also displays the value of request.variant as well as the name of the variant that was loaded.
First page load
Response from Turbo Drive
Response from Turbo Stream
System configuration
Rails version: 7.1.3.2
Ruby version: 3.2.2
Gem version: 3.11.0
bockets and karlentwistle
Metadata
Metadata
Assignees
Labels
No labels


