Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-select somehow cancels the click event for react-datepicker to hide? #2141

Closed
a-eid opened this issue Nov 11, 2017 · 4 comments
Closed

Comments

@a-eid
Copy link

a-eid commented Nov 11, 2017

here is gif showing off the problem.

Anybody could help me find out why would this be happening?

@a-eid a-eid changed the title react-select somehow cancels the click event for the datepicker to hide? react-select somehow cancels the click event for react-datepicker to hide? Nov 11, 2017
@emrekeskinmac
Copy link

input names can be the same

@bachbach
Copy link

bachbach commented May 28, 2018

I've got the same issue. I found a workaround which was:

  1. add inputRenderer prop (can be simple div) to Select
  2. keep reference of Select in your component
  3. wrap Select with ClickOutside component from react-click-outside package (perhaps can be other package)
  4. handle onClickOutside={() => selectRef.state.isOpen && selectRef.handleInputBlur()}

@michalpokojski
Copy link

michalpokojski commented May 29, 2018

actually there is another workaround

class CustomDatePicker extends DatePicker {
  deferFocusInput = () => {
    this.cancelFocusInput()
  }
}

read this issue Hacker0x01/react-datepicker#730

@bladey
Copy link
Contributor

bladey commented May 27, 2020

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues / pull requests.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version.

If you aren't using the latest version of react-select please consider upgrading to see if it resolves any issues you're having.

If you feel this issue / pull request is still relevant and you'd like us to review it, please leave a comment and we'll do our best to get back to you.

@bladey bladey closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants