Hello!
I am trying to create a widget that can select multiple layers based on a click event and show them in a series of tabs with a feature widget inside, however, I am new to development in experience builder. Currently I establish a click event listener on the map view and when the view is clicked, I query each FeatureLayerDataSource that is saved in state. I want to be able to select those results on the map but when I use datasource.selectRecordsByIds() with the object ids of the results, I dont see any highlighting on the map, and it appears as though my component renders twice. Its not clear to me why but you can see in the console that the tabs for each datasource gets rendered twice upon the click. This only happens when I use that selectRecordsByIds() method. Does anyone have any advice on how I can fix this or what I can do to make this work properly?
I appreciate any feedback, thank you.