Radio Selection Unselect with Stimulus.js
I recently found myself wanting to be alerted on an unselect action so that I could change what was displayed on the page. A small Stimulus controller that waits for the selection event, and emits its own event that other radio button controllers will receive was the perfect solution! https://onrails.blog/2020/09/25/radio-selection-unselect/
Post a comment