OfficeDev / office-ui-fabric-js

JavaScript components for building experiences for Office and Office 365.
http://dev.office.com/fabric
Other
368 stars 114 forks source link

How could I getElement of the Panel again after the Panel is constructed and Office.EventType.ItemChanged fired? #373

Closed mvpkenlin closed 5 years ago

mvpkenlin commented 6 years ago

I am using the Panel and following the same as the tutorial and apply it to Outlook. https://dev.office.com/fabric-js/Components/Panel/Panel.html

After a button click, the html on div with class 'ms-panel' is gone. I have an event handler on the Office.EventType.ItemChanged. Now I cannot access it as it is removed from the html file. How can I

1) reload the html? I have tried location.reload();, The page reload when ItemChange in the first time. But it does not work any more after the first time. it seems like Office.initialize only fire once and cannot register the Office.EventType.ItemChanged again.

2) If I adding the original html back to the parents div and re-init the Panel. How can I remove the last panel or removing the panelhost?

Linda-Editor commented 5 years ago

Microsoft no longer supports this content and will not be responding to bugs or issues. We recommend that you use the newer version, Office UI Fabric, with React as your front-end framework. We are closing this issue; if you still need assistance with Fabric.js, visit Stack Overflow/office-ui-fabric.