0

I use an Office UI Fabric Panel (nothing special, just as in the Microsoft examples). However, I want to trigger the panel programmatically. I open the panel lik this:

 $("#btnOpenPanel").trigger( "click" );

In the panel I have a form. When I submit the form I do an update in the database and close the form. The database update works fine and I want to close the panel the same way I opened it. So like this again:

 $("#btnOpenAddPanel").trigger( "click" );

But that is not working. The panel remains open.

Is there some other way to close the panel?

hacking_mike
  • 1,005
  • 1
  • 8
  • 22
  • Sorry to push but can someone help me out here? – hacking_mike Apr 16 '18 at 12:11
  • At first glance I see that the selector isn't the same: the first time you select `#btnOpenPanel`, in the second selector there is an additional **Add** `#btnOpenAddPanel`. If that doesn't solve it, please post a more elaborate example. – Stefan Reimers Apr 17 '18 at 06:39

1 Answers1

0

I found the solution.

Using: panelInstance.dismiss(); closes the panel.

hacking_mike
  • 1,005
  • 1
  • 8
  • 22