Select to view content in your preferred language

On click of custom widget Open and Close Sidebar widget

71
1
yesterday
naveenbesri
Frequent Contributor

Hi, I am building a custom widget where on click needs to open sidebar widget. kindly suggest me 

 

Thanks,

Naveen

0 Kudos
1 Reply
JeffreyThompson2
MVP Frequent Contributor

You will need to find the Widget Id number of the Sidebar Widget then use it in this function.

//To open sidebar
getAppStore().dispatch(appActions.widgetStatePropChange(`widget_${sidebarId}`, 'collapse', true))

//To close sidebar
getAppStore().dispatch(appActions.widgetStatePropChange(`widget_${sidebarId}`, 'collapse', false))
GIS Developer
City of Arlington, Texas
0 Kudos