//Import the CheckBoxSelection module from the dropdowns package
import { MultiSelectComponent, CheckBoxSelection, Inject } from '@syncfusion/ej2-react-dropdowns';
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
//Inject the module in rendering part
render() {
return (<div id="multichecbox" className='control-pane'>
<div className='control-section col-lg-8'>
<div id="multigroup" className="control-styles">
<h4>CheckBox</h4>
<MultiSelectComponent id="checkbox" ref={(scope) => { this.mulObj = scope; }} dataSource={this.countries} fields={this.checkFields} placeholder="Select countries" mode="CheckBox" showSelectAll={true} showDropDownIcon={true} filterBarPlaceholder="Search countries" popupHeight="350px">
<Inject services={[CheckBoxSelection]} />
</MultiSelectComponent>
</div>
</div>
</div>);
} |