dash-core-components icon indicating copy to clipboard operation
dash-core-components copied to clipboard

"Wrong" CustomEvent in link.react.js prevents updates of multipage app?

Open vogt31337 opened this issue 4 years ago • 0 comments

Hi,

I'm using a dash multi page app and I've created a custom navbar. For which I've essentialy copied link.react.js. And until now everything worked fine. But since version 1.3.1 of DashCoreComponents and 1.11.0 (or higher) of Dash it stopped working. Which means: All sites were reachable, but if I clicked on the navbar, the content portion wouldn't change to the new content. Which is quite a breaker for a multi page app...

My workaround was to replace line 60 in link.react.js: window.dispatchEvent(new CustomEvent('_dashprivate_pushstate'));

With the 'old' version (from dcc ver 1.0.0, link.react.js): window.dispatchEvent(new CustomEvent('onpushstate'));

So my app is working again, I can't explain why, my knowledge isn't deep enough for that. But what happens, seems to be the CustomEvent isn't the "correct" one anymore. I don't know what you guys changed in the background, but I think you have good reasons for these changes. This issue isn't really a bug, more some kind of asking why this happened and what possible problems I've created with my workaround. Also I'd like to know if this workaround stops working at some point in the future (probably, but maybe you've got a better clue).

Thanks in advance! Keep on doing, dash is pretty amazing :)

vogt31337 avatar Nov 17 '20 18:11 vogt31337