Forum Discussion
Aleš Šavli
Oct 26, 2017Brass Contributor
SharePoint New UI - problem with JS when redirecting from one page to another
Hello all!
Yesterday I noticed that in new experience on Team Site there is some kind of new "MDS" (minimal download strategy). I created 2 pages and put 2 of my newly created SPFx webparts on each. If I redirect from one page to another the page is not realy reloading but just "transisting" to another this causes some problem with javascript I'm loading (datarangepicker).
Is this something that this fuctinoality can be turned off or Is there any article describing how to avoid this problems?
- Aleš ŠavliBrass Contributor
So yesterday I did some additional testing and I found out that if I go from one page to the page with SPFX webpart in quick navigation the SPFX webpart is loaded twice (render() method). I tried using "this.renderedOnce" but it is always "false" so not a solution.