Posts

Showing posts from May 31, 2020

React Checkbox Control SPFx

Interface Step 1 export   interface   ITechnologies {      technology ?: chkTechnology [],      checkboxSlectedValues ?: string } export   interface   chkTechnology {      name : string ,      isChecked : boolean ,      lable : string ,      cssClass ?: any } .tsx file Step 2 import  {  Label  }  from   'office-ui-fabric-react/lib/Label' import  {  Checkbox  }  from   'office-ui-fabric-react/lib/Checkbox' ; import  {  ITechnologies ,  chkTechnology  }  from   './ICheckBoxControlstates' Step 3 public   constructor ( prop :  ICheckBoxControlProps ,  any ) {      super ( prop );      this . state  = {        checkboxSlectedValues :   "" ,        technology :  [         {            lable :   "Sharepoint" ,            name :   "Sharepoint" ,            isChecked :   false ,            cssClass :   styles . chkControl         },         {            lable :   "SPFx" ,            name :   "SPFx" ,            isChecked