Table created based on the radio item and dropdown menu

Hi,

How to create a dash table which it is according to the radio item and dropdown menu?

I had create a dropdown menu which its listing is based on the radio item, and the table shown will bases on the dropdown selection.
But the table is not able to based on the radio item selected.

flow:
radio item > dropdown menu > table shown

import plotly.express as px
from plotly.offline import plot

import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Output,Input, State
import dash_bootstrap_components as dbc
from dash import dash_table
from dash_table import DataTable, FormatTemplate
import dash_bootstrap_components as dbc

import pandas as pd
import pandas_datareader.data as web


from datetime import date, datetime


import pyodbc
import os
import psycopg2

from plotly.io import write_image
import flask
import base64


# read data from csv
df= pd.read_csv("dummy.csv")

product_cat = list(df['Product'].unique()) 



# Dashboard layout
app= dash.Dash(__name__,external_stylesheets=[dbc.themes.BOOTSTRAP],
                meta_tags=[{'name': 'viewport',
                            'content': 'width=device-width, initial-scale=1.0'}],

                )


app.layout = dbc.Container([
    dbc.Row([
        dbc.Col(html.H1("Tes", 
                        className = 'text-center text-primary, mb-4 '
                        ,style={"textDecoration":"underline",'font-weight': 'bold'}),
                width=12
                ),
      
        ]),
    html.Br(),
    html.Br(),
    
    dbc.Row([
       dbc.Col([
           html.H3('Product'
                    ,style={'font-size': '25px'}
                   ),
           
           ], width=3, md=4),
       
       dbc.Col([            
           dcc.Dropdown(id='product_dd', value= None, #df['year'].max(),
                          options = [{'label':x, 'value':x} 
                                    for x in product_cat],
                          
                          searchable = True, search_value='',
                          placeholder= 'Please select ...',
                          clearable= True
                          ),
           
           ], width=3, md=4),    
       
       
       ]),
    html.Br(),
    
    
    
    dbc.Row([       
        dbc.Col([            
            html.H3('Date'
                    ,style={'font-size': '25px'}
                    ),
            
            ], width=3, md=4),
    
        dbc.Col([            
            dcc.Dropdown(id='date_dd', value= '',                         
                          searchable = True, search_value='',
                          placeholder= 'DD/MM/YYYY',
                          clearable=True
                          
                          ),
                    
            ], width=3, md=4),

        ], ), #style={"flexWrap": "wrap", "width":"250px"}
    html.Br(),
        
    
    
    dbc.Row([
          dbc.Col([
            html.H3('Sale ID'
                    ,style={'font-size': '25px'}
                    ),

              
              ], width=3, md=4),
          
          dbc.Col([          
              dcc.Dropdown(id='saleid_dd', value='',
                          searchable = True, search_value='',
                          placeholder= 'Please select ...',
                          clearable=True
                          ),
                  
              html.Br(),
              
              dcc.RadioItems(id= 'raditem',
                       options=[
                           {'label': ' Saleid1', 'value': 'sale1'},
                           {'label': 'Saleid2', 'value': 'sale2'},
                           {'label': ' Saleid3', 'value': 'sale3'},
                       ],
                       value='sale1',
                       # inline=True,
                       style =  {'margin-right': '10px'} #'width': '100px', 'float':'left', 'height': '100px',
                    ) 
              
                  ], width=3, md=4),
          
          
          
          ]),
    
    html.Br(), 
    
    dbc.Row([
        dbc.Col([
            html.P("Table:",
                    style={"textDecoration":"underline"}),
            
                                    
            dash_table.DataTable(id='table', 
                                    columns=[
                                        {'name': 'Status', "id": 'header', 'editable': False},
                                        {'name': 'Activity Date', "id": 'info', 'editable': False},
                                            ],

                                  style_cell={'textAlign': 'left'},
                                                                  
                                  ),
           
                ]),
            ]),   
          html.Br(),

    
])




# DROPDOWN
@app.callback(
    Output('date_dd','options'),
    Input('product_dd', 'value')
    )


def update_dd (product_dd):
  
    date = df.drop_duplicates(['Date'], inplace= False)
    
    relevant_date = date[ df['Product'] == product_dd]['Date'].values.tolist()

    date_option= [dict(label=x,value=x)for x in relevant_date]
    
    
    return date_option



@app.callback(
    Output('saleid_dd','options'),
    Input('date_dd', 'value'),
    Input('raditem', 'value')
    )


def update_dd (date_dd, raditem):
          
    if raditem == 'sale1':
        trnid= df.drop_duplicates(['Saleid1'], inplace= False)
        relevant_id= trnid[ df['Date'] == date_dd]['Saleid1'].values.tolist()
        trnid_option= [dict(label=x,value=x)for x in relevant_id]
    
    
    elif raditem == 'sale2':
        trnid= df.drop_duplicates(['Saleid2'], inplace= False)
        relevant_id= trnid[ df['Date'] == date_dd]['Saleid2'].values.tolist()
        trnid_option= [dict(label=x,value=x)for x in relevant_id]
        
        
    elif raditem == 'sale3':
        trnid= df.drop_duplicates(['Saleid3'], inplace= False)
        relevant_id= trnid[ df['Date'] == date_dd]['Saleid3'].values.tolist()
        trnid_option= [dict(label=x,value=x)for x in relevant_id]
    
    
    
    return trnid_option


# #TABLE

@app.callback(
    Output('table', 'data'), 
    Input('saleid_dd', 'value')
    )


def update_table(selection):
    if len (selection) == 0:
        return dash.no_update
    
    else:  
        dff = df[(df['Saleid1'] == selection)]  

        
        transpose = dff.melt(id_vars = ['Customer', 'Amount']
                  ,var_name = ['header']
                  ,value_name = 'info')

        columns = transpose[['header','info']]
        
        data= columns.to_dict('records')

       
        return data
        
        
        
        
     
if __name__ == "__main__":
    app.run_server(debug=True, port=1001)