Replies: 2 comments
-
Alternatively, you may use run_js to disable a button like this: |
Beta Was this translation helpful? Give feedback.
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) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我的目的是点过按钮后等待函数完成后才可以继续点击。
Beta Was this translation helpful? Give feedback.
All reactions