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

Setting Input value dynamically

Is it possible to set the value of the Input component dynamically?

I’m trying set the value to a previous values stored in localstorage.
The following does not work (gives error: Error loading dependencies)

    Output('input-title', 'value'),
    [Input('local', 'modified_timestamp')],
    [State('local', 'data')]
def on_data(ts, data):
        return data['title']
    except ValueError:
        return ""
1 Like