How to use datatable active cell with confirmDialog

I have a data table. I get the rows no. from the data table via the active cell. Now If some action has to be taken based on each row ID’
Is there a mechanism to put a confirm dialog to get verification (confirm dialog) before every selected row action?

Problem is that if active_cell values are the same the next time, the dialog box keeps coming up again and again to perform the same action repeatedly on the same row id .

If I understand you correctly, it sounds like you may want to create a hidden div and output the active_cell row_id in the callback. Then using the state of that div, compare it to the input of active_cell, if they match do nothing. Otherwise display the DCC confirm.

Thanks Croll for reply ; Here is the code snippet I am dealing with
with following I am repeatedly getting a dialog box fired asking me to take action

( I do have an n interval that updates after lets say 1 min all my divs

Here is the code i am working on

submit_n_clicks State from dialog box confirm_dialog
take_action_table Table that is clicked
take_action_dict a 3 key dictionary that stores the action information

@app.callback([Output('message_show_region', 'children'),Output('take_action_table', 'active_cell')],
              [Input('confirm_dialog', 'submit_n_clicks'),State('take_action_table', 'active_cell')])
def update_output(submit_n_clicks,cell_clicked):
    if cell_clicked == {'row': -1, 'column': 0, 'column_id': 'variable'}:
    if not submit_n_clicks:
        return 'Cancelled by user',{'row': -1, 'column': 0, 'column_id': 'variable'}
        return "Action taken " + str(take_action_dict),{'row': -1, 'column': 0, 'column_id': 'variable'}

@app.callback([Output('confirm_dialog', 'displayed')],[Input('take_action_table', 'data'),State('take_action_table', 'active_cell')])
def display_confirm(take_action_table,cell_clicked):
    print("Cell Clicked : ",cell_clicked)
    # print("Transac Order : ",str(take_action_dict))
    if cell_clicked == {'row': -1, 'column': 0, 'column_id': 'variable'}:
    take_action_dict['action_type'] = 'no_action'
    take_action_dict['action_details'] = take_action_table[cell_clicked['row']]
    take_action_dict['action_confirm'] = None
    return [True]

Your code sample doesn’t align with your original question. I am going to provide a sample referring to what I was talking about in my previous post. Hopefully this will help.

create a hidden div to store the active_cell value:

html.Div(id=‘store-ac’, style={‘display’: ‘none’})

I am not sure why you are hard setting the row and column in your callback. Just compare the values.

@app.callback([Output('messag_show_region', 'children'), Output('store-ac', 'children')], [Input('take_action_table', 'active_cell')], [State('store-ac', 'children')])
def display(ac, storedValue):
    selected = ''
    if ac['row_id'] != storedValue:
        # this is when a new row or the first row is selected
        selected = 'New row selected'
        #this is when the same row is selected
        selected = 'Same row selected'
   return [selected, ac['row_id']]