Select to view content in your preferred language

Popup selectedFeatureIndex goes to 0 after custom action

795
2
09-02-2022 06:53 AM
Steve_Dale
Emerging Contributor

Hi,

I have a popup for cluster point data.  When I open the popup for a cluster location it provides the summary page in popup along with the rest of the features.  If I scroll to a feature and click a custom action button that I wrote, after the action is complete it will go back to the summary page- selectedFeatureIndex = 0.  I have tried setting the index to the selected featue in the action, but it is not working.  Any ideas on how to prevent this behavior.

Thanks,

Steve

0 Kudos
2 Replies
ReneRubalcava
Esri Frequent Contributor

Can you provide a repro of this. If I use the custom action in this sample it doesn't seem to behave like that.

https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=popup-actions

Can't tell what might be happening in your situation.

0 Kudos
Steve_Dale
Emerging Contributor

The popup is using cluster point features. 

I am adding an action button to a layer pop up.  After getting to a selected feature through the pop up list the action button appears.  The action uses the selected feature attributes to query another layer and displays results in a handlebar div.  After calling that action the selectedFeatureIndex goes to 0 and the summary content is displayed.

I tried setting the pop selectedFeatureIndex to see if I can maintain the selected feature in the popup.

view.popup.viewModel.selectedFeatureIndex = 1;  //example.
 

Summary page after clicking on clusterSummary page after clicking on cluster
 
 
 
 

Select the featureSelect the feature

 

 

Click work orderClick work orderReturns to this popupReturns to this popup

0 Kudos