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

Wanted: Supports passing in a Ref or HTMLElement as handle #679

Open
zhmushan opened this issue Nov 1, 2022 · 3 comments · May be fixed by #680
Open

Wanted: Supports passing in a Ref or HTMLElement as handle #679

zhmushan opened this issue Nov 1, 2022 · 3 comments · May be fixed by #680

Comments

@zhmushan
Copy link

zhmushan commented Nov 1, 2022

It is easy to increase the mental burden by specifying the handle through the selector. I need to always pay attention that there is no duplicate name in these selectors. In React, Ref is very flexible and convenient. If it can support specifying handle through Ref, it must be very cool.

@zhmushan
Copy link
Author

zhmushan commented Nov 1, 2022

@STRML I'd love to make a PR for this, if you agree.

@STRML
Copy link
Collaborator

STRML commented Nov 1, 2022

Yeah I think that makes sense.

@PuruVJ
Copy link

PuruVJ commented Dec 6, 2022

Tooting my own horn here: @neodrag/react supports this already if you want https://github.com/PuruVJ/neodrag/tree/main/packages/react#handle

Docs aren't updated fully yet, but you can pass an array of HTMLElement/ Refs as well. Passing an HTML element or Ref, or mixing and matching inside the array, all of it works

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

Successfully merging a pull request may close this issue.

3 participants