HumanSignal / HumanSignal/label-studio

"selected" property in Chioce tag isn't working as expected when combined with "perRegion" in Choices tag

Open
#4,798 2 comments 7 reactions 1 assignee Claimed by @makseq View on GitHub
community:investigate community:reviewed
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
When setting `selected="true"` in the `Choice` tag, combined with `perRegion="true"` in its parent `Choices` tag, with example labeling method KeyPointLabels, when a key point is marked, the designated `selected="true"` choice will not be selected by default.

**To Reproduce**
Steps to reproduce the behavior:
1. Set labeling interface code as such:
```html
















```
2. Import any image, and mark arbitrary amounts and types of key points on the image.
3. Select any marked region.
4. Discover that none of the "Is Visible" choices is selected by default.
5. Open its task source.
6. Discover that this is indeed not a visual bug, but the option is truly not present in the source.

**Expected behavior**
The choice with `selected="true"` should be selected by default after marking.

**Screenshots**
[Screenshot](https://i.imgur.com/7gT2xWH.png)

**Environment (please complete the following information):**
- OS:
- Host OS: Windows 10 Home 21H2 19044.2106 Windows Feature Experience Pack 120.2212.4170.0
- Client OS: Windows 11 Home 22H2 22621.2283 Windows Feature Experience Pack 1000.22662.1000.0
- Label Studio Version: 1.8.2.post0

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.