Ver 1.33.0 example:

After update to latest 1.34.0

The code is below:
import streamlit_antd_components as sac
if "test_text" not in st.session_state:
st.session_state["test_text"] = None
def onChangeTest():
st.session_state["test_text"] = st.session_state["testing123"]
sac.chip(
items=[
sac.ChipItem(label='apple'),
sac.ChipItem(label='google'),
sac.ChipItem(label='github', icon='github'),
sac.ChipItem(label='twitter', icon='twitter'),
sac.ChipItem(label='disabled'),
], label='label', index=0, align='center', radius='md', multiple=False, key="testing123", on_change=onChangeTest
)
st.write(st.session_state["test_text"])
UPDATE
And it seems to be affecting other custom components like the popular streamlit-option-menu here.
It seems that on_change has no effect with the new Streamlit version. Your onChangeTest function is not called!
Anyway st.session_state[âtesting123â] contains the right value. Why programming like you did?
May be Iâm wrong, but it seems to me that the âStreamlit philosophyâ is rather to avoid callbacks.
x = st.button(âŚ)
if x:
âŚ
Why in your case, you donât have:
x = sac.chip( ⌠,key = âxxxxâ, âŚ)
if st.session_state.xxxx == âgoogleâ:
âŚ
if st.session_state.xxxx == âappleâ:
âŚ
Regards
Hey,
The function onChangeTest is called via the on_change=onChangeTest. So when I interact with the widget, the function runs.
Other native widgets have this feature too, with buttons having on_click.
Insert a line âprint(âxxxxâ)â into your callback function and you will see that it is not called in this latest version of Streamlit! I took your code and did it!
You should also discuss with the author of the âsacâ package and ask for their opinion.
I left a reply on this issue:
the internal package structure has changed due to a refactoring; if you change the import in the streamlit_callback.py to from streamlit.components.v1 import custom_component as _components, it should work again. If you are not the author of sac, this might be something to bring to them.
That being written, this is not an official API we are going to guarantee from Streamlit-side
However, we will look into this more closely and try to come up with a clean API for the future so that this patch is not needed anymore. In the meantime, I hope this^ unblocks you (for now).
Thank you! Appreciate this so much 
Hey, thanks for the fix. But there seems to be some inconsistency in the result. I implemented it in my app and other custom components I built and at times, it does not seem to work. I know it was a hacky workaround but would have been nice to have had it.
Anyway, thanks for trying 
I am sorry to hear that the new workaround does not work as reliably! We are looking into adding this as a native feature, see this PR: Allow passing on_change_callback for CustomComponents by raethlein ¡ Pull Request #8633 ¡ streamlit/streamlit ¡ GitHub
If you want to and have some time, the PR has a wheel file attached to it: https://core-previews.s3-us-west-2.amazonaws.com/pr-8633/streamlit-1.34.0-py2.py3-none-any.whl which you could try out in the meantime 
Thanks for your speedy reply. Downloading it, will get back to you shortly 
So I have downloaded it (loooong ahah), how do I make it work? Not sure from the git PR. Could you give an example?
DW, I got it, works like a charm! 
Thank you, I am also looking for a solution to this.
Amazing! Thank you so much for the validation
I will try to wrap it up next week and it should land in release 1.35 or 1.36 (more likely 1.36)