I've encountered an issue when using the withTable selection with a map-based custom visual that I'm developing using Leaflet. The wrong row is selected when I create the selection in the custom visual. To demonstrate this, I put the same data passed to the custom visual in a native table visual.
When I click on the table visual, it shows a specific segment in the custom visual:
But when I click on the segment in the custom visual, it shows a different row in the table:
I am using the v2.6.0 of the API. Simplified code is below. What am I doing wrong?
I tried updating to the Visuals API 3.5.1, but I'm still encountering the same issue.
I also tried packaging the visual and trying it in Desktop, but still encountering the same issue.
An easier way to demonstrate is to duplicate the custom visual on the page. When I select the rows in one custom visual, the same number of rows is passed to the other custom visual, but not the same rows.
I tried investigating at the identityIndex from the selectionId.getKey(), but that seems like it's an index local to the visual itself.