How to configure Web AppBuilder Query widget to turn on a layer as a trigger to an action?

03-06-2022 01:48 AM
New Contributor

I have the default query widget and my task is to find a way to either find a default action of turning on a layer or create this action and modify the default widget and add it to it. 

is there a default "action" that i can add to a trigger that turns on a layer? and if the answer is no, then where exactly in the files is the code that has all the other default actions?  

0 Kudos
1 Reply
Occasional Contributor III

Assuming you are using the dev edition of WAB. In he widget.js file there are some functions you can utilize. postCreate: is used when the widget is initialized upon opening the map.  onOpen:. is used when the widget opens. Opening can be done by clicking or by setting it to open by default.

0 Kudos