Open jhartma opened 9 years ago
Because you re-use keys in renderAnnotation, react will attempt to reorder.
I think it will work if you do:
renderAnnotation: function(annotation, index){ return <AnnotationListItemComponent key={index} rank={annotation.rank} content={annotation.content} id={annotation._id} /> },
yep, thx :+1:
Hi there, I am seeing some strange behaviour when reactive data changes. This is what I have
It is basically a sortable list which updates the rank after a list item is dropped and shows the items in the new order. Everything works fine. When an item is dropped, the Meteor.call method is triggered and the rank is changed. However, the view does not rerender the items in the correct order. Instead, it rerenders them in the old order. I had a look a the new data: the output in the componentDidUpdate shows the correct order. In addition, when having a second browser window open, the items are displayed in their correct order.
Any ideas?