Prioritize callbacks and order of completion

Hi,

I have two drop downs (A and B).
A updates a Graph and B decides if you want a sub-group, and also updates the graph after selection.
I have also implemented a datatable where the user can select a row that updates the two dropdowns with the row data. By updating the dropdowns they automatically updates the graph.

The problem i now have is that if a value is selected in B and a row is selected in the datatable which does not contain the already selected sub group value in B I get an error.

The callback first update A that tries to update the graph but if B is not included in the set i get an error,

Now it updates in this order:
Row Selection --> Dropdown A (+ old B value) --> Graph --> Error --> Dropdown B
But i need it to update the two dropdowns before the dropdowns update the graph:
Row selection --> A --> B --> Graph

Is this possible to add a condition that the datatable callback is prioritized and other callbacks will only update after completion?

You will need to add Code. Thx

I hope this helps illustrate the code

import dash
import dash_table
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State

app.layout = html.Div([
                   dcc.Graph('Graph'),  
                   dcc.Dropdown(id='DropdownA', etc...),
                   dcc.Dropdown(id='DropdownB', etc...),
                   dash_table.DataTable(id='DataTable',etc...)
                   ])

.
.
.

#Updates a graph depeniding on A or A and B

    @app.callback(
            Output('Graph','figure'),
            [Input('DropdownA','value'),
             Input('DropdownB,'value')])
    def update_MAINfigure(A,B):

     fig=somefunc(A,B)
     
     return fig

#selected row and take respective column data to update dropdown values

@app.callback(
        [Output('DropdownA','value'),
         Output('DropdownB,'value')],
        [Input('DataTable','selected_rows')],
        [State('DataTable','data')
         State('DropdownA','value'),
         State('DropdownB,'value')])
def update_Dropdowns(row_pick,data,old_A,old_B):
       if row_pick:

           rowdata=data[row_pick[0]]
    
           A=rowdata['col1']
           B=rowdata['col2']
    
           return A,B
            
      else:   
  
           return old_A,old_B