Skip to content
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

when setting options , uncaught type error apears #1

Closed
eric8810 opened this issue Mar 17, 2023 · 8 comments
Closed

when setting options , uncaught type error apears #1

eric8810 opened this issue Mar 17, 2023 · 8 comments

Comments

@eric8810
Copy link

dom tree be like
<div class="user-list" v-sortable="{ options: { handle: '.handle', animation: 200, easing: 'cubic-bezier(0.65, 0, 0.35, 1)' } }" @end="onOrderChange" > <div class="user-list-item" v-for="user in renderList" :key="user.uid"> <div class="handle"> <AIcon category="general" name="drag-dot-vertical"></AIcon> </div> <img class="user-head" :src="user.headIconUrl" /> <div class="user-name">{{ user.nickname }}</div> </div> </div>

Error Message:

Uncaught TypeError: Cannot read properties of null (reading 'options') /node_modules/.vite/deps/vue3-sortablejs.js?v=1770eda3:773:39 TypeError: Cannot read properties of null (reading 'options') at http://192.168.111.212:8080/node_modules/.vite/deps/vue3-sortablejs.js?v=1770eda3:773:39 at Array.some (<anonymous>) at _detectNearestEmptySortable2 (http://192.168.111.212:8080/node_modules/.vite/deps/vue3-sortablejs.js?v=1770eda3:772:13) at HTMLDocument.nearestEmptyInsertDetectEvent2 (http://192.168.111.212:8080/node_modules/.vite/deps/vue3-sortablejs.js?v=1770eda3:838:19)

@eliottvincent
Copy link
Owner

eliottvincent commented Mar 24, 2023

Hey @eric8810 ! I somewhat didn't see your issue. I will check this over the week-end and let you know :)

@eliottvincent
Copy link
Owner

So I tested your example and it works fine on my side. Can you provide me with a reproduction link?

@Elgorm
Copy link

Elgorm commented Jun 14, 2023

when the renderList changes, this error occurs.

@eliottvincent
Copy link
Owner

Hey @eric8810 @Elgorm , I tried to reproduce but I don't not encounter such issue.
Please provide a reproduction example so I can further investigate and fix a potential bug :)

@eric8810
Copy link
Author

I'd make a reproduce demo today

@Elgorm
Copy link

Elgorm commented Jun 26, 2023

I wanted to make an example, only on vue, but without a backend there is no error, the error occurs when 2 identical lists are on the same page and the data after sorting comes over the network updating both lists.

@eliottvincent
Copy link
Owner

Hey @Elgorm ! You can still provide an example, just mock your backend behavior.

@eliottvincent
Copy link
Owner

Closing for inactivity. Feel free to re-open if needed.

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

3 participants