How to disable submit button #4378
Unanswered
muratbedir
asked this question in
Q&A
Replies: 2 comments
-
Is there any help ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @muratbedir, Providing a minimum reproducible example would encourage others to help. But your code is neither minimal nor reproducible. import time
from nicegui import run, ui
def compute():
print('Simulating computation...')
time.sleep(1.0)
print('Done')
async def handle_click():
button.disable()
await run.cpu_bound(compute)
button.enable()
button = ui.button('Compute', on_click=handle_click) In order for UI updates to happen while CPU-bound tasks are running, you should use |
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
-
How to disable submit button for excidently press ? I have a program and I want to disable hak-al button after press and when operation finish I need to enable.
Submit button call a big function and I already add mybutton.disable() but it does not work as I expect after big function end it worksing but I need to disable button when it clicked.
I can not find correct ansfer any help required
thansk.
I wrote below code but it not work I expect
Beta Was this translation helpful? Give feedback.
All reactions