I'm running into some issues trying to customize the Search widget. The use case is as follows.
- Refresh the app and open it to the initial extent.
- Have layers that are not visible at the initial extent.
- Select features from the invisible layers.
- Zoom to the selected features.
It appears that what is happening is that when you zoom to the selected features, it causes the hidden layers to draw for the first time. This calls resume on the layers, which appears to clear any selections on the layer if it is the first time resume has been called. This basically clears out the selection from step 3. I found similar behavior in the Attribute Table widget. If you double-click on a feature that is not visible, it will zoom to it. If it is the first time that the given layer has been displayed, the zoom ends up clearing the selection. You can see it in how the blue color in the row disappears. If you double-click it again, the blue color stays. The issue is the same with my Search widget. It is only an issue the first time the layer is displayed. After that, it works correctly.
Any ideas?