Hi DeBao,
Thanks for contacting Syncfusion support.
Query #1: multiple classes support in Checkbox and Dropdownlist
We would like let you know that CheckBox and Dropdownlist controls already has support for adding multiple cssClass attributes. Please find the code example for adding multiple classes in Checkbox and Dropdownlist.
JS:
<div className='row'>
<CheckBoxComponent checked={true} label='CheckBox: true' ref={(scope) => { this.checkboxObj = scope; }} cssClass={this.state.valueString !== "Individual" ? "e-small" : "e-disbled e-small"}></CheckBoxComponent>
<DropDownListComponent id="games" dataSource={this.sportsData} cssClass={this.state1.valueString !== "Individual" ? "e-small" : "e-disable e-small"} ref={(dropdownlist) => { this.listObj = dropdownlist; }} change={this.onChange_alert.bind(this)} fields={this.fields1} placeholder="Select a game" value={this.value1} popupHeight="220px" />
We have prepared a sample for your reference to showcase the usage of multiple css classes in Dropdownlist and checkbox. Please check the below link.
Query #2: Dropdownlist change event not working
We have checked with a sample to check the change event of Dropdownlist and we can confirm that it is working as expected. We have showcased the change event in above Stackblitz sample.
After cross checking with the above sample. if you are facing any difficulties in using Checkbox or dropdownlist, please get back to us with an issue replicated sample or the component definition file that would help us in replicating the reported issue. The details you provide will help us assist you better.
Query #2: Disable state binding in checkbox is not working
We were able to reproduce the reported issue and we need to validate more on this. So, we will validate further and update you with further details on November 15th, 2018. Meanwhile we would suggest you the work around solution to add the disabled property for checkbox component by using the scope reference variable. Please find the sample link below.
JS:
<div className='row'>
<CheckBoxComponent checked={true} label='CheckBox: true' ref={(scope) => { this.checkboxObj = scope; }} cssClass={this.state.valueString !== "Individual" ? "e-small" : "e-disbled e-small"}></CheckBoxComponent>
</div>
onChange(args) {
this.checkboxObj.disabled = (args.itemData.Value == "TRUE") ? true : false;
}
Kindly check the above sample link and get back to us if you need any further assistance on this.
Regards,
Deepa L.