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

DatePicker onDropdownClose is called every mouse click outside component when no date was selected #2538

Closed
Martijn-Schoenmaker-Webbio opened this issue Sep 23, 2022 · 5 comments

Comments

@Martijn-Schoenmaker-Webbio
Copy link

What package has an issue

@mantine/dates

Describe the bug

When opening the datepicker and closing it again after not having selected a date, the onDropdownClose call is fired every time you click outside a component. It only stops when opening again and selecting a date.

What version of @mantine/hooks page do you have in package.json?

5.4.0

If possible, please include a link to a codesandbox with the reproduced problem

https://codesandbox.io/s/mantine-datepicker-ondropdownclose-calls-jhujml?file=/src/App.tsx

Do you know how to fix the issue

No response

Are you willing to participate in fixing this issue and create a pull request with the fix

No response

Possible fix

No response

@snehilvj
Copy link
Contributor

snehilvj commented Oct 1, 2022

+1

@Martijn-Schoenmaker-Webbio
Copy link
Author

@rtivital I think this issue is fixed with the 5.5.1 update by this merge --> #2602

@rtivital
Copy link
Member

rtivital commented Oct 4, 2022

This PR is for MultiSelect only, there were no changes for DatePicker component

@Martijn-Schoenmaker-Webbio
Copy link
Author

It seems like it did, I cannot replicate the issue in v 5.5.1: Codesandbox

@rtivital
Copy link
Member

rtivital commented Oct 4, 2022

Well, no idea how it fixed it, but I'll take it

@rtivital rtivital closed this as completed Oct 4, 2022
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

3 participants