You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to not trigger the props.onChange() when Select2 is rendered the very first time or when props.value() is explicitly changed ?
When I update both the props.value & props.onChange(), it calls the previously set change handler.
This seems to be because the setValue() call in componentWillReceiveProps() triggers the change event and the componentWillUpdate() lifecycle method updates the handlers. Is there a particular reason why we update value in componentWillReceiveProps() ? https://github.com/rkit/react-select2-wrapper/blob/master/src/components/Select2.js#L54-L58
Is it possible to not trigger the props.onChange() when Select2 is rendered the very first time or when props.value() is explicitly changed ?
When I update both the props.value & props.onChange(), it calls the previously set change handler.
This seems to be because the setValue() call in componentWillReceiveProps() triggers the change event and the componentWillUpdate() lifecycle method updates the handlers. Is there a particular reason why we update value in componentWillReceiveProps() ?
https://github.com/rkit/react-select2-wrapper/blob/master/src/components/Select2.js#L54-L58