-
Notifications
You must be signed in to change notification settings - Fork 35
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
TypeError: useDragDropContext is not a function or its return value is not iterable at createDroppable #105
Comments
How are you calling it? |
I have the exact same error, can't seem to fix it. |
I don't mean to co-opt the OP's issue, but i have the exact same problem - so if you want me to create another issue i can. However, here is a gist of my code. |
Thanks for the gist. In that code I see you are calling You need to ensure you are a descendant of the drag drop provider context in order to use the create draggable/droppable/sortable functions. Note to self: maybe throw an explicit error with more explanation in this case rather than rely on default solidjs error. |
I am, i wrapped my entire app with the provider. However, ill look at the docs and re-try now. |
I was able to get rid of the error, by wrapping my entire UI in the When i search my DOM for the elements, i simply get them being assigned to Note I am able to get the examples to run flawlessly, just not when i implement their logic into my project. |
Can you share your updated code? From your previous code you were also missing passing the handlers into your draggable element. In other words, you need to either have |
I just ran into this as well. I'm wondering if there could be a better error message if |
Issue description
I encountered an error when using the createDroppable function.
Full error
package.json
vite.config.ts
Thank you for your help in addressing this issue.
The text was updated successfully, but these errors were encountered: