vue.draggable.next icon indicating copy to clipboard operation
vue.draggable.next copied to clipboard

fix #140 empty context

Open danielsussa opened this issue 2 years ago • 11 comments

Fix empty node element: Uncaught (in promise) TypeError: Cannot set properties of null (setting '__draggable_context') Simple error handler

const getHtmlElementFromNode = (node) => {
  const el =
      node.el || (Array.isArray(node.children) && node.children[0].el.parentNode);
  return el || {};
};

danielsussa avatar Feb 06 '23 10:02 danielsussa

@danielsussa, thanks for the PR. Since this package and repo appears to be unmaintained, I published your changes to a new package: https://www.npmjs.com/package/@marshallswain/vuedraggable.

This project needs a lot of love. If I can find time, I'll update the tooling to use vitest, vite, and vitepress. It definitely needs a TS rewrite, too.

marshallswain avatar Feb 06 '23 14:02 marshallswain

It looks like the changes break the onDragStart handler., which references this.context.element, but it's undefined. Not sure what's different in my setup.

marshallswain avatar Feb 06 '23 14:02 marshallswain

hey @marshallswain , I will perform some tests with this change with my project. Good to know that you will help to put some love in there!

danielsussa avatar Feb 06 '23 19:02 danielsussa

I just applied an NPM install using your version! Worked pretty!! Thanks @marshallswain. I can help on further demands.

danielsussa avatar Feb 06 '23 19:02 danielsussa

@marshallswain 感谢,我换成你的包后完美解决draggable与vue3的transition-group不兼容的问题了

zzliux avatar Apr 19 '23 03:04 zzliux

@marshallswain Thank you very much. However, my .list-enter-active and .list-leave-active classes are not being triggered. Only the .list-move class is being applied when removing or adding elements.

code: tag="transition-group" :component-data="{tag:'ul',name:'list'}"

Kill-pig-fly avatar May 25 '23 08:05 Kill-pig-fly

when thiss will be merged?

rendomnet avatar Jun 01 '23 07:06 rendomnet

@marshallswain Thank you very much. However, my .list-enter-active and .list-leave-active classes are not being triggered. Only the .list-move class is being applied when removing or adding elements.

code: tag="transition-group" :component-data="{tag:'ul',name:'list'}"

Yes I faced the same issue, .list-enter-active and .list-enter-from is not trigger when I add a element to my list.

NtchPlayer avatar Jun 13 '23 09:06 NtchPlayer

Thank you very much

cn-kelon avatar Jul 11 '23 02:07 cn-kelon

@danielsussa, thanks for the PR. Since this package and repo appears to be unmaintained, I published your changes to a new package: https://www.npmjs.com/package/@marshallswain/vuedraggable.

This project needs a lot of love. If I can find time, I'll update the tooling to use vitest, vite, and vitepress. It definitely needs a TS rewrite, too.

Hello, I noticed that you released the project on NPM but haven't continued with it. I can help maintain it, or we can create a new repository to take over. I'm already doing this for other public projects.

Looking forward to your response. Best regards,

icleitoncosta avatar Oct 17 '23 10:10 icleitoncosta

Search for Vue-draggable-plus. The primary language is Chinese and you can switch the docs to English. Those guys have adopted it and made it great. No need to maintain our own.

marshallswain avatar Oct 18 '23 03:10 marshallswain