Office ui fabric panel won't close

回眸只為那壹抹淺笑 提交于 2019-12-11 19:52:06

问题


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:


I found the solution.

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



来源:https://stackoverflow.com/questions/49851239/office-ui-fabric-panel-wont-close

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!