Replies: 2 comments
|
Alternatively, you may use run_js to disable a button like this: |
0 replies
|
Another way is checking if there is other callback running in button's callback: running = False
def onclick():
nonlocal running
if running:
return toast("Task is already running, please wait it finish first.")
running = True
# your onclick logic
...
running = False
put_button("BTN", onclick) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
我的目的是点过按钮后等待函数完成后才可以继续点击。
All reactions