Update Dropdown options and keep value unchanged?

Not sure what is going on here. I try to update a dropdown menu and keep the value unchanged.
As soon as I include Output('pko-dropdown', 'value') in the outputs the app stops working.

    @app.callback(
    Output('pko-dropdown', 'options'),
    #Output('pko-dropdown', 'value'),
    Input('tab', 'value'),
    Input('pko-delete-output', 'children'),
    State('wdir', 'children'),
    State('pko-dropdown', 'options'),
    State('pko-dropdown', 'value')
    )
    #def pko_controls(tab, peak_deleted, wdir, old_options):
    def pko_controls(tab, peak_deleted, wdir, old_options, old_value):
        if tab != 'pko':
            raise PreventUpdate
        peaklist = T.get_peaklist( wdir )
        if peaklist is None:
            raise PreventUpdate
        options = [{'label':label, 'value': i} for i, label in enumerate(peaklist.index)]
        if options == old_options:
            raise PreventUpdate
        value = 2 #old_value if old_value is not None else 0
        return options #, 0

What is wrong? Do I have to store and update the value in a separate callback?

Hi @mail8
You have a total of 5 Inputs and States, but only 4 arguments inside the callback function. Not sure that’s the solution, but it is definitely an error. I hope that helps