You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[bug] Whenever I click item, The order of the list does not change, and the setlist event will be triggered, which is not in line with the expectation.
#200
Open
tianfeng65 opened this issue
Jan 15, 2021
· 2 comments
Whenever I click item, I just click. The order of the list does not change, and the setlist event will be triggered, which is not in line with the expectation.[bug]
Expected behavior
Only trigger setList when the order changes
The text was updated successfully, but these errors were encountered:
tianfeng65
changed the title
Whenever I click item, I just click. The order of the list does not change, and the setlist event will be triggered, which is not in line with the expectation.[bug]
[bug] Whenever I click item, The order of the list does not change, and the setlist event will be triggered, which is not in line with the expectation.
Jan 15, 2021
I way I solved this was handling the extra parameters that the setList callback returns
setList={(newItems, _, { dragging }) => {
// Dragging element is only present if you dragged an item, if it is a click it is null
if (!dragging) {
return;
}
setList(newItems);
}}
Describe the bug
Whenever I click item, I just click. The order of the list does not change, and the setlist event will be triggered, which is not in line with the expectation.[bug]
Expected behavior
Only trigger setList when the order changes
The text was updated successfully, but these errors were encountered: