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
I'm currently using hotwire (turbo and stimulus). I'm using useTransition with the default options to show/hide a dropdown as part of the page layout and it has its own controller. Then I have an element where I transition between 2 states so I used useTransition with options hiddenClass: false and removeToClasses: false and this is in its own controller as well.
The problem I'm having is when I navigate away from the page with the element that switches states, my dropdown in the page layout just shows up by default. It seems that the hidden class isn't being applied to it anymore and the toClasses are being retained as well. This made me think that the options I used in my state switching element gets somehow applied to the dropdown in my page layout.
When I explicitly specified those options in my dropdown, it seems to have solved the problem.
Hopefully you'd be able to understand my description of the problem. Thanks!
The text was updated successfully, but these errors were encountered:
marcoroth
changed the title
useTransition options being applied to a different controlleruseTransition: options being applied to a different controller
Aug 6, 2022
I'm currently using hotwire (turbo and stimulus). I'm using useTransition with the default options to show/hide a dropdown as part of the page layout and it has its own controller. Then I have an element where I transition between 2 states so I used useTransition with options hiddenClass: false and removeToClasses: false and this is in its own controller as well.
The problem I'm having is when I navigate away from the page with the element that switches states, my dropdown in the page layout just shows up by default. It seems that the hidden class isn't being applied to it anymore and the toClasses are being retained as well. This made me think that the options I used in my state switching element gets somehow applied to the dropdown in my page layout.
When I explicitly specified those options in my dropdown, it seems to have solved the problem.
Hopefully you'd be able to understand my description of the problem. Thanks!
The text was updated successfully, but these errors were encountered: