QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.87k stars 1.31k forks source link

[📖] An example or cookbook of how to do drag and drop interactions #6958

Open osdiab opened 1 month ago

osdiab commented 1 month ago

Suggestion

It's a pretty common set of interactions and given that Builder literally is a drag and drop CMS it seems like Qwik ought to be able to handle drag and drop interactions well; while I know that drag events exist, searching for it in the docs site doesn't really turn much up and it still would be helpful to have examples of what a typical drag and drop workflow would look like in Qwik. Thanks!

gioboa commented 1 month ago

Yep, I created an application with drap and drop with Qwik. You need to do use onDragOver$ / onDragLeave$ / onDrop$ :+1: A cookbook example will be fantastic.

genki commented 5 days ago

In my experience, sync$ is needed for accessing to dropped files via ev.dataTransfer.