We see there is a way to close an off-panel widget, although using openWidget(widgetID) is not working.
This is the code to close:
How would we open?
So your saying that this thread does not work for you?
Web AppBuilder - Open in-panel Widget Programmatically
Retrieving data ...