Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Multi page and parse url

I have many filter input for plot the graph and each page have different filter. I want to parse the filter to url so anyone get the same result with the url.
I keep all filter that use in that page in all_states
for example
page 1 have : all_states_1 = [State(‘input-run-id’, ‘value’), State(‘input-p-value’,‘value’),
State(‘date-range-id’,‘start_date’),State(‘date-range-id’, ‘end_date’),
State(‘date-selection-id’,‘value’),State(‘analysis-scope-id’,‘value’),…other filter]
page 2 have : all_states_2 = [State(‘input-run-id’, ‘value’), State(‘input-p-value’,‘value’),…other filter]

@app.callback(Output('url', 'search'), [Input('apply-button-id', 'n_clicks')], all_states)
def update_location_from_states(n_clicks, *state_values):
    dct_states = {s.component_id: v for (s, v) in zip(all_states, state_values)}
    return "?" + urlencode(dct_states)

The Output callback can only call 1 time ,So I cant call 2 url for each page .
Any suggestion to solve this problem to make the output url can parse both page