How to make the search bar open at start?

595
11
Jump to solution
10-05-2017 03:13 PM
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

I don't do much work with story maps but if you know the file that the Search widget is created in the in the constructor there will be a enableButtonMode property or you can just invoke the expand() method on the Search dijit.

View solution in original post

11 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Brandon,

   I don't see an attached file and the WAB search widget is opened by default so this question has me scratching my head.

0 Kudos
BrandonPrice
Occasional Contributor

Hi Robert,

The search bar is actually in a story map. Mine doesn’t open on default. I do not why the attachments were not attached. I have tried to attach them again.

Brandon

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

I don't do much work with story maps but if you know the file that the Search widget is created in the in the constructor there will be a enableButtonMode property or you can just invoke the expand() method on the Search dijit.

BrandonPrice
Occasional Contributor

Thanks Robert. I was able to do this in the viewer-min.js file of the story map by changing the enableButtonMode for the geocodercontainer from !0 to !1

Best,

Brandon

RobertScheitlin__GISP
MVP Esteemed Contributor

Great don't forget to mark this as answered then.

0 Kudos
BrandonPrice
Occasional Contributor

Ok. Sounds good.

0 Kudos
RickeyFight
MVP Regular Contributor

I was able to get this to work but would there be a way to make it stay the button version for mobile devices? 

Code here: 

function c() {
 var e = $(r.container).find(".geocoderBtn");
 f = n.createGeocoder({
 map: r,
 domNode: e.find(".geocoderContainer")[0],
 enableButtonMode: !0,
 searchOptions: o
 }).then(function (t) {
 a = t, e.find(".esriGeocoderContainer input, .esriGeocoderSearch").attr("tabindex", "-1")
 })
 }
0 Kudos
RickeyFight
MVP Regular Contributor

Never mind I figured it out

0 Kudos
BrandonPrice
Occasional Contributor

Hey Ricky,

Are you saying have it still be closeable? I haven’t figured that one out yet.

-Brandon

0 Kudos