I have a fairly big search based app with 10/15 callbacks linked to 3 components. One of my callback functions creates new buttons and returns these buttons to the app layout. However, when I try writing callbacks for these buttons I do not get any output. My app is structured something like this:
app.layout = html.Div( html.Button('submit', id='sub'), html.Div(id='output') ) @app.callback(Output('output', 'children'), [Input('sub', 'n_clicks')] def create(n): if n != None: return html.Button('example', id='test')
This code creates a new button with id test but I cannot use this button for anything. I want a function to be called when I click on this id=‘test’ button but this does not happen. Can someone clarify why?