Black Lives Matter. Please consider donating to Black Girls Code today.

Multipage app callbacks when not all inputs are in the current layout

I’m using slapdash on a multi-page app. In each page I have a graph, that when clicked I want to jump to a new page.

To avoid a refresh, I am trying to make a giant callback that listens for clickData on all possible graphs on any page, that ultimately updates the master app URL.

What I’m assuming is the problem is that not all inputs are present on the layout when I want this callback to fire, which means the callback doesn’t work.

Is this true? And if so, this was the only way I knew to get around having multiple callbacks on multiple pages updating the same output.

Thanks!
Scott

Yes its true, for a callback to work you will need every input id in the rendered dom elements. Which leads you to having an url componennt on every page, and a callback on every page as well.