@@ -7,7 +7,7 @@ import type { Constructor } from '../common/mixins/constructor.js';
77import { EventEmitterMixin } from '../common/mixins/event-emitter.js' ;
88import { FormAssociatedCheckboxRequiredMixin } from '../common/mixins/forms/associated-required.js' ;
99import {
10- type FormValue ,
10+ type FormValueOf ,
1111 createFormValueState ,
1212 defaultBooleanTransformers ,
1313} from '../common/mixins/forms/form-value.js' ;
@@ -40,7 +40,11 @@ export class IgcCheckboxBaseComponent extends FormAssociatedCheckboxRequiredMixi
4040 }
4141
4242 protected readonly _focusRingManager = addKeyboardFocusRing ( this ) ;
43- protected override _formValue : FormValue < boolean > ;
43+ protected override readonly _formValue : FormValueOf < boolean > =
44+ createFormValueState ( this , {
45+ initialValue : false ,
46+ transformers : defaultBooleanTransformers ,
47+ } ) ;
4448 protected _value ! : string ;
4549
4650 @query ( 'input' , true )
@@ -90,15 +94,6 @@ export class IgcCheckboxBaseComponent extends FormAssociatedCheckboxRequiredMixi
9094 @property ( { reflect : true , attribute : 'label-position' } )
9195 public labelPosition : ToggleLabelPosition = 'after' ;
9296
93- constructor ( ) {
94- super ( ) ;
95-
96- this . _formValue = createFormValueState ( this , {
97- initialValue : false ,
98- transformers : defaultBooleanTransformers ,
99- } ) ;
100- }
101-
10297 protected override createRenderRoot ( ) : HTMLElement | DocumentFragment {
10398 const root = super . createRenderRoot ( ) ;
10499 this . _hideLabel = isEmpty ( this . _label ) ;
0 commit comments