Hi,
I'm currently developing a widget using the ArcGIS API for JavaScript 4.x that will be integrated into a web application alongside various other widgets. However, I am facing challenges in how i should work with selection of features. In ArcGIS API for JavaScript 3.x, there was a convenient getSelectedFeatures method that provided all selected features from a layer, but I cannot find a direct equivalent in 4.x.
It seems that features in 4.x don't have a selected attribute, and after some research, it appears that the recommended approach is to use the Highlight method. However, I cannot find a method for getting all highlighted features, like getSelectedFeatures. Since the features might be selected from other widgets where my widget has no control, I'm looking for the standard way to select features and retrieve selected features. Any suggestions or advice on how I should work with selection in ArcGIS API for JavaScript 4.x would be greatly appreciated.
Thanks in advance!