Sharlaan / material-ui-superselectfield

multiselection autocomplete dropdown component for Material-UI
https://sharlaan.github.io/material-ui-superselectfield
MIT License
266 stars 92 forks source link

Several Issues found #192

Open KanzakiYui opened 5 years ago

KanzakiYui commented 5 years ago

I found the following facts:

  1. onChange will be called every time the dropdown menu is closed, even if the value isn't changed, especially when multiple=false
  2. checkedIcon and unCheckedIcon is not available when multiple=false
  3. There is no DefaultValue option especially when multiple=false

Thus, it causes a problem I found when multiple=false and select the option which is already selected: (1) onChange will be called (2) function assigned to value will NOT be called, which means value will not be re-calculated (3) function selectionsRenderer will be called while the 1st param (value) is null. However, it should be the previous value (if applicable) when user select the selected option, since when multiple=false, there is no checked/unchecked conception behind. And this supposed behavior can be found in browsers' default single dropdown.