@app.callback(Output(‘output’, ‘children’),
[Input(f’btn{i}’,‘n_clicks’) for i in range(n)])
def output(*args):
pass
the n is determined by length of dcc.Store(‘store’,‘data’)'s data
How to achieve it,Thank you very much!
@app.callback(Output(‘output’, ‘children’),
[Input(f’btn{i}’,‘n_clicks’) for i in range(n)])
def output(*args):
pass
the n is determined by length of dcc.Store(‘store’,‘data’)'s data
How to achieve it,Thank you very much!
Take the n_click_timestamp
props instead for the inputs. Then find the highest one in args and do args.index(highest)
, you now have your btn id.
thank you @Philippe
Like example:[Input(f’btn{i}’,‘n_clicks’) for i in range(n)],
button id is undefined,determined by n,
and n is determined by length of dcc.Store(‘store’,‘data’)'s data
My difficulty is can not get n ,it is not a global variable,but a local variable
it is length of dcc.Store(‘store’,‘data’)'s data
Did you find any solution?? I have a similar problem. Thanks!