Injecting custom js code into streamlit components

you can use JsCode class from st_aggrid like shown in this post