Louis-Philippe ENGELMANN PRO said 3 months ago on Dependent Fields with Hotwire :
Nice cast, as usual ;-) A question to improve my skills Why an addEventListener / change in the Stimulus controller rather than a data-action / change in the html code?

David Kimura PRO said 3 months ago on Dependent Fields with Hotwire :
It's just a "fancy" way to add the data-action without having to add it manually. It does lose some visibility within the HTML view that there is an action that will be triggered, but given the stimulus controller's functionality, it would be expected. If you had many toggles on the same page, the extra noise could be distracting and also leave more room for errors. 

Aria PRO said 2 months ago on Dependent Fields with Hotwire :
Very helpful video! Another scenario I'd be interested in seeing for dependent fields is how to dynamically load data for one input based on the selection of another using Stimulus and Hotwire. For instance, loading a country's states from the server when a country is chosen. Not sure if you have already covered this in another video.

David Kimura PRO said 2 months ago on Dependent Fields with Hotwire :
I have covered it in previous episodes, but it was using JQuery. Thanks for the suggestion.

Login to Comment