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

Property 'onDrawEnd' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RDraw> & Readonly<RDrawProps>' #123

Closed
CrumpetsNTea opened this issue Jan 9, 2023 · 2 comments

Comments

@CrumpetsNTea
Copy link

Getting TS error: Property 'onDrawEnd' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly' when trying to use the onDrawEnd prop on an RDraw component

        <RInteraction.RDraw
              onDrawEnd={(e: DrawEvent) => {
                // eslint-disable-next-line no-underscore-dangle
                return console.log(e.feature);
              }}
              type="Polygon"
              condition={shiftKeyOnly}
              freehandCondition={altShiftKeysOnly}
            />

The onDrawEnd function fires perfectly fine.

@mmomtchev
Copy link
Owner

It does seem to work for me, are you sure you have the latest version? Can you check what files are you including and whether you are using the CJS or the ES6 version - this depends on your bundler.

@CrumpetsNTea
Copy link
Author

CrumpetsNTea commented Jan 10, 2023

Yep, I thought we were running the newest version, but I was wrong. I have just upgraded to 1.4.8 and the issue is no longer present. We were running 1.4.5. Thank you for your time!

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

2 participants