I have a radio button defined as:
<.label(
....styling
^.onClick ==> { event =>
event.stopPropagation()
props.select
},
<.input.radio(
....styling
^.onChange ==> { event =>
event.preventDefault()
Callback.empty
},
^.checked := props.isActive,
^.disabled := props.disabled
)
)
So basically I aim to invoke a callback(props.select) on click of the radio button, and stop further propagation(hence event.stopPropagation). Also, on change event I want default operation not to happen(hence event.preventDefault).
But I observe that callback(props.select) is invoked 2 times when radiobutton is clicked.
What am I missing here?