Noction / vue-draggable-grid

https://noction.github.io/vue-draggable-grid/
81 stars 33 forks source link

Allow drag and drop from outside. #14

Open marcelo-rebello opened 1 year ago

marcelo-rebello commented 1 year ago

We currently cannot drag and drop an item from outside the grid. The reason for this is that the dragEvent method is not public. (see https://github.com/melrose13-69/vue3-dragable-grid-layout/issues/5)

The fix is easy. just have to add this bit of code anywhere in the setup of 'GridLayoutVue`

defineExpose({ dragEvent })

a nice place to add this bit is https://github.com/melrose13-69/vue3-dragable-grid-layout/blob/13711c87691cbc5c9b793f1bab90ab857e79a158/packages/vue3-drr-grid-layout/src/components/GridLayout/GridLayout.vue#L472

donkeylmx commented 1 year ago

i also meet this problem ,please expose ”dragEvent“ to GridLayout Ref

web-zhangbo commented 1 year ago

mark, please call me when issues closed, thk