hc-oss / react-multi-select-component

Lightweight (~5KB gzipped) multiple selection dropdown component
https://codesandbox.io/s/react-multi-select-example-uqtgs
MIT License
386 stars 89 forks source link

Support for onBlur and onClose events #16

Closed porteron closed 4 years ago

porteron commented 4 years ago

The props are pretty limited right now and is inactionable when closing or completing interaction with the MultiSelect.

It would be great to be able to use these events (onBlur and onClose), especially for scenarios where data should be fetched upon close of dropdown.

porteron commented 4 years ago

You could probably just update the MultiSelect props to utilize the onBlur focus state you've already built.

https://github.com/harshzalavadiya/react-multi-select-component/blob/master/src/multi-select/dropdown.tsx#L107