I have a problem with the Search widget when I only have one source.
In my application the sources array is updated depending on what layers I dynamically add to the map.
I have three layers that can be added using two visual elements. The first option ("Fields") adds one layer and the other ("Blocks") adds two. After the appropriate layers are added, I execute this code:
I've found that when there is only one source, the sources dropdown is empty and only shows an outline.
I've tried setting the "enableSroucesMenu" attribute to false when there's only one layer to no avail.
The styling of the sources button does change when there's only one source but it's still visible.
Is there something I'm missing?