question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Moving a listitem only works once

See original GitHub issue

Hi there!

So I am using your library together with Meteor. Sorting a list works perfectly at first, but it always works only once. I then have to reload the whole page to get it working again.

On second try the following error occurs:

Uncaught TypeError: Cannot read property 'top' of undefined
    at _class.animateNodes (...)
    at _this.handleSortMove (...)

In detail, the error occurs in this line. (if my Chrome debugger is correct the edgeOffset.top part!)

Am I doing something wrong or is this a bug? I am using your lib based on an array in this.state, so I can’t see any interferences with Meteor?! I hope you can help!

best, P

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

37reactions
ChristopheVandePoelcommented, Apr 10, 2017

Hey @Twisterking. Your very first line:

const SortableItem = SortableElement(({ooitem}) => <Item key={ooitem._id} ooitem={ooitem} />);

Lose the key:

const SortableItem = SortableElement(({ooitem}) => <Item ooitem={ooitem} />);

For some reason it messes up when you add one yourself. (although for me, it did so silently, without the error)

2reactions
claudericcommented, Apr 25, 2017

No worries, just wanted to set the record straight for any newcomers landing on this issue 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Moving SharePoint List Item to another list based on criteria
Solved: Greetings to all, I'm trying to build a flow that moves a SharePoint list item to another list based on a column...
Read more >
Moving to the only one next list item with jquery - Stack Overflow
What I'm trying to achieve is that when you click on right or the left button, the class 'style' moves to the neareast...
Read more >
Solved: Move (not copy) a list item (not a document) from
My suggested solution. Once item saved (created), move the item to a folder based on the entered data. Proposed implementations. 1. Move Item ......
Read more >
Animation Techniques for Adding and Removing Items From a ...
Applying CSS-only animations to a dynamic DOM event (adding brand new elements and fully removing elements) is extremely tricky work.
Read more >
Swiftui list row with multiple buttons? - Apple Developer
Can one get multiple buttons to work when included in a List row? ... this might be the desired behavior to make the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found