Select to view content in your preferred language

JSAPI Search Widget in Custom ExBuilder Widget

3613
10
11-30-2020 09:38 AM
DaveFullerton
Occasional Contributor III

I used the Esri sample widgets 'editor' and 'js-api-widget' as starting points to create a simple custom Search widget. It simply embeds the JSAPI Search widget in the ExB widget (the code is attached for v 1.1). I got a reasonable result except for one thing. The dropdown list of search candidates does not overflow the parent div (class="widget-content"). This is demonstrated in the picture below where the ExBuilder widget has a red outline - the 3rd address candidate in the dropdown list is cut off.

Capture.PNG

This is a problem when this custom widget is placed above a map. Either it has to be placed way above the map to leave room for the dropdown, or it has to be placed partly in front of the map. The problem with having part of the widget in front of the map is that it prevents that part of the map from being clicked on.

The code is attached. Can anyone tell me if there is a solution for this?

Another thing I ran into was a problem migrating it to ExB 1.2. The arrow keys work to navigate the dropdown list of search candidates in 1.1 but not in 1.2. With 1.2 I get an error on InputKeyup:

image.png

And here is a link to the ArcGIS Idea for a Search widget in ExBuilder in case you want to vote it up:
https://community.esri.com/t5/arcgis-experience-builder-ideas/search-widget-for-experience-builder/i...

10 Replies
DaveFullerton1
New Contributor II

Good to know.  I didn't want to try to make that work if you had already found it couldn't be done.  It may be some time before I can look into it.  Thanks for answering all of my questions.

0 Kudos