Super simple yet just not working in Ember octane…
My goal is to simply control a couple of radio buttons programmatically in a DDAU fashion. This means in my action handler I’m calling event.preventDefault()
to stop the natural DOM change event that sets the state to “checked” because I want to control that.
<input {{on "click" (fn this.handler mod)}} type="radio" name="location-mod" value={{mod.value}} checked={{eq mod.value @selectedMod.value}}/>
This works to check the radio initially on page load but when clicking, and even though I can see the selected mod value change, the radio checked state does not update.
I’ve tried using the excellent Ember-Modifier package to try this:
if (element) {
element.checked = !!condition;
}
Which also doesn’t work! Yet when I manually grab the dom element myself in a console and set the checked property it works…
What in the heck am I missing?
Appreciate it.