How to dismiss a ui.notification
after seconds and do not sleep?
#4437
Closed
weinibuliu
started this conversation in
Ideas / Feature Requests
Replies: 1 comment 4 replies
-
Hi @weinibuliu, What exactly are you trying to do? Why do you create a notification with a 20 seconds timeout and change it to 3 seconds afterwards? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Hi everyone!
I was trying to use
ui.notification
,it's good.I tried to dismiss it after seconds,but I met a problem.asyncio.sleep() will block the current task(like
time.sleep()
).Sorry I just have few knowledge of asyncio,so I try to find another way.I changed my code.I edit the
_props
ofui.notification
.It works well.Now I don't have to wait for sleep.Can I create a PR to provide a function to set timeout?
Beta Was this translation helpful? Give feedback.
All reactions