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

if i set a value in custom multiselect event i cannot able to remove that item and also that item exist in datasource again

if i set a value in custom multiselect event i cannot able to remove that item and also that item exist in datasource again   and also i get some error
like ERROR TypeError: oldValue.slice(...).sort is not a function
    at MultiSelectComponent.push../node_modules/@syncfusion/ej2-dropdowns/src/multi-select/multi-select.js.MultiSelect.validateValues 

can you please help me to sortout this issue 

Thanks in Advance
Regards
Thowbik

1 Reply

SP Sureshkumar P Syncfusion Team November 11, 2019 10:21 AM UTC

Hi thowfik, 
 
Greetings from Syncfusion support. 
 
We checked the reported issue in our end. We can able to reproduce the reported issue in our end. The cause of the issue is you have set the value as string or number. But in multiselect component value property is array of string | number | Boolean.  So you need to set the value as array format. Please refer the below code, 
 
this.multiselectObj.value = ['Game6']; 
 
we created a sample based on your requirement. Please find the sample here: https://stackblitz.com/edit/angular-vqv7kb-dtm2xi?file=app.component.html  
 
to know more about our value property. Please refer the below documentation. 
 
Regards, 
Sureshkumar P 


Loader.
Up arrow icon