Using ArcGIS Maps SDK for JavaScript version 4.x, it is possible for the view's popup to contain an array of features. In this case, it is possible to page through them using the forward/back arrows.
Assume I wish to remove one of the features from the popup's features
array programatically, so that it doesn't display in the popup. How can I do this cleanly?
In this simple example, I manually remove the first feature from the array, and it is no longer possible to navigate forward/back in the popup. However, the forward/back buttons remain and the popup still lists "2 of 2" features.
(This is a simplistic example, and in reality I would use some logic to determine which of the features to delete.)
clear removes all features, but I only wish to remove certain features programatically.
How can I remove the feature and also decrement the feature counter?