Dependent dropdwonmenu in a datatable

Hi everyone,
I’m new to dash and I’ve been trying to create a datatable with a main dropdown menu and a dependent one.
I have not been able to accomplish the dependent one, here my code:

app.layout = html.Div([
dcc.Dropdown(id=‘insurance’,
multi=False,
options=[{‘label’: i, ‘value’: i} for i in df[‘mco’].unique()],
value=‘Healthfirst Excelsior’,
placeholder=‘Please Select…’,
searchable=True,
style={‘width’:‘40%’}),

    dcc.Dropdown(id='type',multi=True,  
                           options=[]),

dash_table.DataTable(id=‘datatable_id’,
columns=[{“name”: i, “id”: i} for i in df.columns],
data=df.to_dict(‘records’)
])

@app.callback([Output(‘datatable_id’,‘data’),Output(‘type’,‘options’)],
Input(‘insurance’,‘value’))
def filter_table_mco(ins):
filtex = df[‘mco’].isin([ins])
dff = df[filtex]
if len(dff) == 0:
return (df.to_dict(‘records’),[{‘label’: i, ‘value’: i} for i in df[‘file_type’].unique()])
else:
return (dff.to_dict(‘records’),[{‘label’: i, ‘value’: i} for i in dff[‘file_type’].unique()])

@app.callback(Output(‘type’,‘value’),
Input(‘type’,‘options’))
def get_table_type(tlist):
return [k[‘value’] for k in tlist]

This part runs successfully, until here the field ‘mco’ can be changed dinamically and the field ‘field_type’ changes the options but when I try to connect it to the app through another call back the field is not populated.
I guess I have to use the original df in order to filter it by the two fields. This is the part I have not been able to make it work, any direction will be much appreciated.

@app.callback(Output(‘datatable_id’,‘data’),
[Input(‘insurance’,‘value’),Input(‘type’,‘value’)])
def update_table(ins,t):
if len(t) == 0:
return dash.no_update
else:
filx = df[‘mco’].isin([ins])
filt = df[‘file_type’].isin([t])
dfx = df[filx & filt]
return dfx.to_dict(‘records’)