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

Pass event to config onClickOutside #1040

Open
DenisLantero opened this issue Nov 8, 2024 · 0 comments
Open

Pass event to config onClickOutside #1040

DenisLantero opened this issue Nov 8, 2024 · 0 comments
Labels
awaiting triage The issue is not reviewed by the maintainers enhancement New feature or request

Comments

@DenisLantero
Copy link

Is your feature request related to a problem? Please describe.
In my project, I have a weird date picker that has a normal date picker in the middle and is between 2 number inputs. The concept is similar to a date-range picker, but instead of manually picking the range, the user picks a target date and specifies a number of days before and after that specific date (this is simple to understand in timelines and calendar views for the target user).
I'll leave you a screenshot for reference.

image

The issue that I found myself in is that whenever I click on one of the number inputs and I have the popper open, it rightfully closes.
What I need to do is check if the clicked element is one of the 2 numeric inputs, but on the onClickOutside function that you can pass through the config object, it doesn't seem to forward the event from the actual listener.

Describe the solution you'd like
It would be nice to have the event passed to the onClickOutside function that I pass to the config object, similar to the validateBeforeEmit function that is already being passed.

Describe alternatives you've considered
I'm sure that I can do some weird thing with listeners and refs to do this, but it's not the cleanest solution

Additional context
I took a look at the source code and I can submit a PR myself, but first I wanted to make sure with you if there are any potential issues and/or reasons you didn't do this already, or if there's a better way to implement/do this, just like the PR guidelines say to do :)

@DenisLantero DenisLantero added awaiting triage The issue is not reviewed by the maintainers enhancement New feature or request labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage The issue is not reviewed by the maintainers enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant