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

Error when a screen/modal with EditControl component is closed. #127

Open
bon19 opened this issue Oct 15, 2021 · 5 comments
Open

Error when a screen/modal with EditControl component is closed. #127

bon19 opened this issue Oct 15, 2021 · 5 comments

Comments

@bon19
Copy link

bon19 commented Oct 15, 2021

I am using react material-ui modal component to display the react-leaflet MapContainer and react-leaflet-draw EditControl. Now, whenever I close the modal, an error occurs. It says

react-dom.development.js:188

   Uncaught TypeError: func.apply is not a function
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
at invokeGuardedCallback (react-dom.development.js:292)
at safelyCallDestroy (react-dom.development.js:19617)
at react-dom.development.js:20090
at unstable_runWithPriority (scheduler.development.js:653)
at runWithPriority$1 (react-dom.development.js:11039)
at commitUnmount (react-dom.development.js:20083)
at commitNestedUnmounts (react-dom.development.js:20163)
at unmountHostComponents (react-dom.development.js:20443)
at commitDeletion (react-dom.development.js:20500)
at commitMutationEffects (react-dom.development.js:22782)
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
at invokeGuardedCallback (react-dom.development.js:292)
at commitRootImpl (react-dom.development.js:22509)
at unstable_runWithPriority (scheduler.development.js:653)
at runWithPriority$1 (react-dom.development.js:11039)
at commitRoot (react-dom.development.js:22381)
at finishSyncRender (react-dom.development.js:21807)
at performSyncWorkOnRoot (react-dom.development.js:21793)
at react-dom.development.js:11089
at unstable_runWithPriority (scheduler.development.js:653)
at runWithPriority$1 (react-dom.development.js:11039)
at flushSyncCallbackQueueImpl (react-dom.development.js:11084)
at flushSyncCallbackQueue (react-dom.development.js:11072)
at discreteUpdates$1 (react-dom.development.js:21893)
at discreteUpdates (react-dom.development.js:806)
at dispatchDiscreteEvent (react-dom.development.js:4168).

I assume that the error is cause by the EditControl component because when I comment it out the issue is gone.

@bon19
Copy link
Author

bon19 commented Oct 15, 2021

Here is my code snippet for reference
image

this snippet is inside a modal component.

@tomer555
Copy link

same here

@ssanchezmarc
Copy link

ssanchezmarc commented Jan 28, 2022

+1 here. Did you find out any solution?

#128 other issue that seems to be related

@DVGY
Copy link
Contributor

DVGY commented Apr 8, 2022

@bon19 @tomer555 Can you provide a live example on code sandbox or a GitHub repo?

@alireza107
Copy link

Same here

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

5 participants