JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Text Boxes & Inputs › smart-check-box and Angular reactive form – how to set value? › Reply To: smart-check-box and Angular reactive form – how to set value?
February 15, 2021 at 7:56 am
#101502
davout
Member
Replication steps
- Start a new Angular project
- Add a new component
- In the component HTML set a reactive form with two ‘smart-check-box’ checkboxes
- In the component init code set up the form with two FormControl elements that pass in an initial false starting value
- Else where in the component code push values into the form using the ‘setValue’ method.
- Try pushing true boolean values into the controls to check the checkboxes – note the error that arises
- Try pushing true string values into the controls – note how the UX does not show the control as checked