I have to use a long callback function that does heavy computation. Meanwhile, I also need its output dynamic conditioned on an store value. Here is the example of what I want:
@app.long_callback(
Output({"name": "div-content", "index": ALL}),
Input("user-input", "value"),
State("n-content", "data")
)
def process(user_input, n_content):
time.sleep(1e6)
return ["hello"+user_input for _ in range(n_content)]
Is there any way to do so? If not, I wonder if there is a way to disable the button when executing the callback function?