We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Removed event not returning itemData

I currently have a MultiSelectComponent whose value I'm manually altering via other controls. The problem I'm having is that if I add more than one value, when attempting to remove any element, the "Removed" doesn't return itemData. 


1 Reply

SP Sureshkumar P Syncfusion Team January 6, 2020 12:18 PM UTC

Hi Kenneth, 
 
Greetings from Syncfusion support. 
 
We have validated your reported problem. We suspect that you have missed to bind this object to the event argument. Please bind the object like below code example to get rid of your issue. 
 
Kindly refer the below code block. 
onRemove(args){ 
      console.log(args.itemData); 
 
    } 
    render() { 
        return (<div className='control-pane'> 
        <div className='control-section'> 
            <div id='multifilter' className="control-styles"> 
              <h4>Filtering</h4> 
              <MultiSelectComponent id="comboelement" dataSource={this.data} removed={this.onRemove.bind(this)} fields={this.fields} placeholder="Select countries"/> 
            </div> 
        </div> 
         
      </div>); 
    } 
 
 
We have created a sample based on your requirement. please check the sample here: https://stackblitz.com/edit/react-ed3jld?file=index.js  
 
Regards, 
Sureshkumar P 


Loader.
Live Chat Icon For mobile
Up arrow icon