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
Relations referred to based on their position in the array rather than their identity, causing state to be incorrectly associated with different relations
#7716
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.
When relations are re-sorted, relations are referred to based on their position in the array rather than their identity, causing state to be incorrectly associated with different relations.
To Reproduce
In a list of relations hover over the items before and after sorting based on order. Hovering over the first relation will highlight the last one in the list after re-sorting.
Expected behaviour
Relations are properly tracked and the component's selected values remain associated with the correct relation.
Environment (please complete the following information):
OS: Windows
Label Studio Version 1.19.0
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When relations are re-sorted, relations are referred to based on their position in the array rather than their identity, causing state to be incorrectly associated with different relations.
label-studio/web/libs/editor/src/components/SidePanels/DetailsPanel/Relations.tsx
Line 37 in 75122c4
By changing the identifier from the array index to the relation id id, we should properly track the relation items.
To Reproduce
In a list of relations hover over the items before and after sorting based on order. Hovering over the first relation will highlight the last one in the list after re-sorting.
Expected behaviour
Relations are properly tracked and the component's selected values remain associated with the correct relation.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: