Dynamic metadata ($meta.label) not refreshing when switching between regions in the same task

Description: I am facing a visual refresh issue in the labeling interface. My project involves pre-annotated tasks where each bounding box (rectanglelabels) contains unique metadata in the meta field (specifically a label and a hierarchyId).

The Goal: I want the interface to dynamically display the specific metadata of the currently selected bounding box in a Sidebar/Header. When an annotator clicks on Box A, they should see “Label A”; when they click on Box B, the text should update to “Label B”.

The Problem: Even though the JSON correctly contains different values for each region, the UI does not refresh the displayed text when switching between regions. It seems to “stick” to the metadata of the first region detected in the task and never re-renders the Header/Text value upon new region selection.

Example of my JSON structure:
{
“id”: 1,
“result”: [
{
“id”: “box_1”,
“type”: “rectanglelabels”,
“meta”: { “label”: “Search Button”, “hierarchyId”: “ID_001” },
“value”: { “x”: 10, “y”: 10, “width”: 20, “height”: 10, “rectanglelabels”: [“button”] }
},
{
“id”: “box_2”,
“type”: “rectanglelabels”,
“meta”: { “label”: “Login Button”, “hierarchyId”: “ID_002” },
“value”: { “x”: 50, “y”: 50, “width”: 20, “height”: 10, “rectanglelabels”: [“button”] }
}
]
}

**My Interface XML (simplified): **




**
Question:** Is there a specific tag or a way to force the UI to re-bind the $meta variables when a new region is selected? I’ve tried using perRegion="true" in various tags, but it doesn’t seem to apply to Header or Text elements for display purposes.