Hello. I would like to use @app.callback in a function that is in another file than the main dashboard file. This function is called in main dashboard file and returns html.Div(), and I would like to use callback for a property within that Div. The code looks like below:
from function_process import function_process external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets = external_stylesheets) app.layout = function_process()
def function_process(): return html.Div(children=[ dcc.Tabs(id='selected_tab', children=[ dcc.Tab(....) dcc.Tab(....) dcc.Tab(....) ]) html.Div(id='content_tab_selected') ])
I would like to write a callback within function_process.py to return specific content to ‘content_tab_selected’ based on the tab choice in ‘selected_tab’. Where should I place the @app.callback for this purpose?