Callback function onLayoutChange from streamlit-elements dashboard.Grid not working

Hello everyone,

I have came across the following bug using streamlit-elements: when I create a dashboard and I use a Grid, the callback function of the grid, namely “onLayoutChange”, is not working.
I followed the example shown in the Github page at chapter 4, which is also not working, and reproduced a minimal working example in the following.

I am using:
streamlit==1.45.1
streamlit-elements==0.1.0

Here is the minimal working example:

import streamlit as st
from streamlit_elements import elements, mui, dashboard

# Define default value of session_state
if "display_info" not in st.session_state:
    st.session_state.display_info = None

# Define the callback
def on_layout_change(updated_layout):
    st.session_state.display_info = "Layout Changed"    

# Define the default layout
default_layout = [dashboard.Item("first_item", 0, 0, 1, 1)]

# Define the grid
with elements("dashboard"):
    with dashboard.Grid(default_layout, onLayoutChange=on_layout_change):
        mui.Paper("First item", key="first_item")

# Print info
st.markdown(st.session_state.display_info)

You can easily check that at the beginning “None” is printed by the markdown, but when dragging of resizing the element in the dashboard.Grid the callback function is not being triggered, so the markdown keeps printing “None”.

How can I fix this?