How do I collapse the search widget in 4.x?

378
4
Jump to solution
06-03-2021 12:11 PM
MattStayner
Occasional Contributor

How do I collapse the search widget in 4.x? I would like it to be like the search widget in 3.x, where it starts as a square button only, and expands out to show the entire widget once the user clicks on it.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
IGCMCGIS
New Contributor III

Hi @MattStayner ,

You could try and implement the Expand funtion as shown in the following config page.(https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html)

There's a sample showcasing the implementaton of this functionality on a Layer List widget.

This should work with the search widget in 4.x as well.

 

View solution in original post

0 Kudos
4 Replies
BenElan
Esri Contributor
0 Kudos
IGCMCGIS
New Contributor III

Hi @MattStayner ,

You could try and implement the Expand funtion as shown in the following config page.(https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html)

There's a sample showcasing the implementaton of this functionality on a Layer List widget.

This should work with the search widget in 4.x as well.

 

View solution in original post

0 Kudos
MattStayner
Occasional Contributor

Hi @IGCMCGIS ,

Yes, throwing that in an Expand widget works great! It looks good too (see below).

Thanks!

MattStayner_0-1622841336316.png

 

IGCMCGIS
New Contributor III

Glad it works @MattStayner . Looks good too!

0 Kudos