소스 검색

hint to use partial for async buttons

Rodja Trappe 3 년 전
부모
커밋
c59256c3cf
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      main.py

+ 2 - 0
main.py

@@ -166,6 +166,8 @@ with example(ui.button):
 
 async_button = '''### Button with asynchronous action
 The button element does also support asynchronous action.
+
+Note: You can also pass a `functools.partial` into the `on_click` property to wrap async functions with parameters.
 '''
 with example(async_button):
     async def async_task():