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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Removed event not returning itemData

Thread ID:

Created:

Updated:

Platform:

Replies:

150357 Jan 3,2020 07:26 AM UTC Jan 6,2020 12:18 PM UTC React - EJ 2 1
loading
Tags: MultiSelectDropdown
Kenneth Tan
Asked On January 3, 2020 07:26 AM UTC

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. 


Sureshkumar P [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon