Skip to content

Error using vue3.2.32 + vite 2.9.4 #138

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

Open
muyi0728 opened this issue Apr 14, 2022 · 15 comments
Open

Error using vue3.2.32 + vite 2.9.4 #138

muyi0728 opened this issue Apr 14, 2022 · 15 comments

Comments

@muyi0728
Copy link

企业微信截图_9f0d6be8-e024-44d8-86ca-f0d626918c3b

@Tnze
Copy link

Tnze commented Apr 16, 2022

same here

@lhermann
Copy link

Made some tests.
The issue is not vite. It works fine with [email protected] (latest as of the time of this writing)
The problem is with [email protected] and higher

@chobitsnerv
Copy link

chobitsnerv commented Apr 17, 2022

Similiar here:
Uncaught TypeError: Cannot set properties of null (setting '__draggable_context') at addContext2 (componentStructure.js:3:15) at componentStructure.js:33:7 at Array.forEach (<anonymous>) at ComponentStructure.updated (componentStructure.js:32:18) at Proxy.mounted (vuedraggable.js:125:24) at callWithErrorHandling (runtime-core.esm-bundler.js:155:22) at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:164:21) at Array.hook.__weh.hook.__weh (runtime-core.esm-bundler.js:2685:29) at flushPostFlushCbs (runtime-core.esm-bundler.js:356:32) at render2 (runtime-core.esm-bundler.js:5688:9)
I did a test and it works again after I removed the tag="transition-group"
Tested under "vue": "^3.2.33", "vite": "^2.9.5"

@chobitsnerv
Copy link

chobitsnerv commented Apr 17, 2022

https://github.com/vuejs/core/blob/main/CHANGELOG.md#3232-2022-04-12
[email protected]looks update "transition-group" which may casue some issues here, I have some warning msg as following from chrome.
Hope it can help in some degree.

image
@David-Desmaisons

@sortingbubbles
Copy link

We are having the same issue after updating to vue 3.2.33.

@pungfen
Copy link

pungfen commented Apr 20, 2022

I having same issue after updating to vue 3.2.33

@muyi0728
Copy link
Author

In the temporary solution of vue3.2.33 version, remove the tag="transition-group" attribute, you can run the code normally

@ddmy
Copy link

ddmy commented Apr 20, 2022

[email protected]

Uncaught (in promise) TypeError: Cannot set properties of null (setting '__draggable_context')
remove the tag="transition-group" attribute, it's ok

@JokerMartini
Copy link

If you remove the transition-group attribute, then you are forced to use a vertical layout of draggable. What does transition group do under the hood that i could mimic without adding the attribute?

@JokerMartini
Copy link

Code like this

<draggable
      v-model="appItems"
      tag="transition-group"
      v-bind="dragOptions"
      item-key="uid"
    >
      <template #item="{ element }">
        <AppItemCard :item="element" :key="element.uid" />
      </template>
    </draggable>

Which previously worked, no longer works with the latest version of vue.

@JokerMartini
Copy link

if you downgrade your vue to vue 3.2.30 it will work

@superchangme
Copy link

if you downgrade your vue to vue 3.2.30 it will work

Have you solved it?

@superchangme
Copy link

it's none of business with vite, it's problem about vue's component transition-group ,it lost el dom property

@dpschen
Copy link

dpschen commented May 22, 2022

This is the same error as in this issue: #140 (comment)

There is a pull request with a fix that is also available as forked package:
zhyswan-vuedraggable

@jomanning
Copy link

This is the same error as in this issue: #140 (comment)

There is a pull request with a fix that is also available as forked package: zhyswan-vuedraggable

This was able to fix it for me, thank you

scmmishra added a commit to chatwoot/chatwoot that referenced this issue Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests