telerik / kendo-react

Issue tracker - KendoReact http://www.telerik.com/kendo-react-ui/
https://kendo-react-teal.vercel.app
Other
211 stars 39 forks source link

React multiselect with custom value plus icon not working as expected #1035

Closed sfc-gh-vchandran closed 3 years ago

sfc-gh-vchandran commented 3 years ago

I am using macOS Big Sur version 11.4. Here the custom item in kendo react multiselect is not added on clicking plus icon. When I use macOS Big Sur version 11.5, clicking on plus icon adding the custom item but the dropdown keep on showing after select. Even on clicking outside, it not disappearing. Screenshot and code sample given bellow.

Screenshot 2021-08-09 at 4 59 27 PM

`import as React from 'react'; import as ReactDOM from 'react-dom'; import { MultiSelect } from '@progress/kendo-react-dropdowns'; const sports = ["Baseball", "Basketball", "Cricket", "Field Hockey", "Football", "Table Tennis", "Tennis", "Volleyball"];

const App = () => { const [value, setValue] = React.useState([]);

const handleChange = event => { const values = event.target.value; const lastItem = values[values.length - 1];

if (lastItem) {
  values.pop();
  const sameItem = values.find(value => value === lastItem);

  if (sameItem === undefined) {
    values.push(lastItem);
  }
}

setValue(values);

};

return

Selected Values: {JSON.stringify(value)}
  <MultiSelect data={sports} onChange={handleChange} value={value} allowCustom={true} />
</div>;

};

ReactDOM.render(, document.querySelector('my-app'));`

nstoychev commented 3 years ago

The issue has been fixed in version 4.9.0.