cuire / svelte-grid-extended

A draggable and resizable grid layout, for Svelte
https://svelte-grid-extended.vercel.app
MIT License
74 stars 8 forks source link

How can I add additional interactive elements to the GridItems? #47

Closed thormuller closed 10 months ago

thormuller commented 10 months ago

I'd like to add, for instance, Like and Remove buttons attached to each GridItem. What is the recommended approach to incorporating these additional behaviors in an implementation?

cuire commented 10 months ago

Hey, its a bit tricky because of event propagation. You can use something like this to prevent it or consider implementing a custom drag handle like this.

thormuller commented 10 months ago

Very helpful, thanks! Appreciate your work on this library.