Office ui fabric panel won't close

2019-08-20 16:34发布

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?

1条回答
神经病院院长
2楼-- · 2019-08-20 17:07

I found the solution.

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

查看更多
登录 后发表回答