Skip to content

Not triggering props.onChange initially and when props.value changes + Old props.onChange gets triggered #55

Description

@vivekmoosani
  1. Is it possible to not trigger the props.onChange() when Select2 is rendered the very first time or when props.value() is explicitly changed ?

  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions