I have an dcc Input looks like this:
dcc.Input(
placeholder="",
type='text',
value=get_value(path),
id = 'first'
)
I want to get the current path in my app which is something like /path/page and use it for initializing the value in my input.
I tried this but doesnt seem to work.
@app.callback(dash.dependencies.Output('first', 'value'),
[dash.dependencies.Input('url', 'pathname')])
def display_page(pathname):
return get_value(pathname)