St_aggrid did not show the filter option in streamlit cloud after app uploading

I am utilizing st_aggrid in my Streamlit application, which functions correctly on my local machine, with both filtering and sorting options working as intended. However, after deploying my app to Streamlit Cloud, the filter option is not visible in my st.aggrid. I have attached a picture comparing the local version of my app with the one on Streamlit Cloud, where the filter option is absent. Please review my code and provide suggestions or the correct code to enable the filter option in st.aggrid.

my local app

streamlit cloud app after upload

this is my code

from st_aggrid import AgGrid
from st_aggrid import AgGrid, GridOptionsBuilder, GridUpdateMode, DataReturnMode
import pandas as pd
import streamlit as st

data = {
    'Region': ['North America', 'North America', 'Europe', 'Oceania',
            'North America', 'North America', 'Europe', 'Oceania',
            'North America', 'North America', 'Europe', 'Oceania'],
    'Country': ['USA', 'Canada', 'UK', 'Australia',
                'USA', 'Canada', 'UK', 'Australia',
                'USA', 'Canada', 'UK', 'Australia'],
    'City': ['New York', 'Toronto', 'London', 'Sydney',
            'New York', 'Toronto', 'London', 'Sydney',
            'New York', 'Toronto', 'London', 'Sydney'],
    'District': ['Manhattan', 'Downtown', 'Westminster', 'CBD',
                'Brooklyn', 'Midtown', 'Kensington', 'Circular Quay',
                'Queens', 'Uptown', 'Camden', 'Bondi']
}

df = pd.DataFrame(data)

return_df = AgGrid(data = df, data_return_mode = 'FILTERED')

this code in local give filter option but did not in stramlit cloud