Attaching change event listener on Toggle
tgeorgiev opened this issue · 0 comments
tgeorgiev commented
From the available docs it is not clear how to attach change listeners to the <cds-toggle>
component.
Looking at the source there seems there is one private checkedChange
, however it is emitted only when switching from checked state to unchecked, but not vice-versa
https://github.com/vmware/clarity/blob/efbf0f01432efb80a64fecb4bf021100687d49cf/packages/core/src/forms/control-inline/control-inline.element.ts#L109
For the time being I am attaching listeners to the <input>
of the toggle, which does the job, is this the way to go?