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

Cannot find name 'OnDrag'. TS2304 #290

Closed
RajaTheKing826 opened this issue Jul 17, 2020 · 10 comments
Closed

Cannot find name 'OnDrag'. TS2304 #290

RajaTheKing826 opened this issue Jul 17, 2020 · 10 comments
Labels
complete invalid This doesn't seem right
Milestone

Comments

@RajaTheKing826
Copy link

Environments

  • Framework name:
  • Framework version:
  • Moveable Component version:
  • Testable Address(optional):

Description

@daybrush
Copy link
Owner

@RajaTheKing826

Hi ??

Please write a description.

@RajaTheKing826
Copy link
Author

i'm working on react i have created a ref as exampleRef= React.createRef () for this im getting typescript error that missmatch of exampleRefTypes and target im searched about this all over the internet but i didn't get the answer so help me to
get out of this typescript problem
i not able to write types for my React Ref which can suitable to your target

@daybrush daybrush added the invalid This doesn't seem right label Jul 21, 2020
@daybrush
Copy link
Owner

@RajaTheKing826

Can you show me a screenshot with that error?
What is the TypeScript version?

@RajaTheKing826
Copy link
Author

yah this is the screenshot of that error
Screenshot from 2020-07-22 12-57-51

@daybrush
Copy link
Owner

@RajaTheKing826
ref type is not supported.

use current.

target={this.headerRef.current}

@RajaTheKing826
Copy link
Author

@daybrush
yah i have tried that also this time i didn't get an error but i didn't get movable in in my out put page
Screenshot from 2020-07-22 14-18-36

@RajaTheKing826
Copy link
Author

if i write target={document.body} im getting movable for entire doc but when im giving a specific ref like above screenshot im not getting movable there

@RajaTheKing826
Copy link
Author

these are the screen shots of my code and its outputs
Screenshot from 2020-07-22 14-43-03
Screenshot from 2020-07-22 14-43-28

@daybrush
Copy link
Owner

@RajaTheKing826

Before mounted, current was null. So please update it once.

@daybrush daybrush added this to the 0.19.0 milestone Sep 4, 2020
@daybrush
Copy link
Owner

@RajaTheKing826

  • moveable 0.19.1
  • react-moveable 0.22.3
  • preact-moveable 0.21.3
  • ngx-moveable 0.15.1
  • svelte-moveable 0.10.1

moveable's new version is released.

Support string(selector), RefObject type.
Try it. Thank you :)

@daybrush daybrush closed this as completed Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complete invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants