From 23913857263c10ad66be8cf7b9752331515fc2f6 Mon Sep 17 00:00:00 2001 From: ythsl28 Date: Wed, 26 Jun 2024 14:05:14 +1000 Subject: [PATCH] Update callback.py change import to support custom component --- streamlit_antd_components/utils/callback.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamlit_antd_components/utils/callback.py b/streamlit_antd_components/utils/callback.py index 6624ec0..b5d700f 100644 --- a/streamlit_antd_components/utils/callback.py +++ b/streamlit_antd_components/utils/callback.py @@ -9,7 +9,7 @@ @Software : PyCharm """ from streamlit import session_state as _state -from streamlit.components.v1 import components as _components +from streamlit.components.v1 import custom_component as _components def _patch_register_widget(register_widget): @@ -52,4 +52,4 @@ def register(key, callback, args, kwargs): assert key is not None, 'Please set a key in component !' args = args if args is not None else [] kwargs = kwargs if kwargs is not None else {} - register_callback(key, callback, *args, **kwargs) \ No newline at end of file + register_callback(key, callback, *args, **kwargs)