title: Python streamlit: Updated cells jump to default using streamlit
body: <p>I try to find a solution for the following issue.
  I would like to upload an excel sheet, consisting of multiple sheets (use case here 2). Afterwards I added tabs via Streamlit and used the aggrid component to be able to change some cells. However if I change cells in Sheet 1 and jump to tab 2 and back, changes are gone. This is not the desired output, meaning that any changes done in the cell should remain.
  I tried via st.cache and st.experimental_memo however without success.</p>
  <p>My code is below</p>
  <pre><code>import numpy as np
  import streamlit as st
  import pandas as pd
  from st_aggrid import GridOptionsBuilder, AgGrid, GridUpdateMode, DataReturnMode, JsCode,GridOptionsBuilder
  
  
  excelfile=st.sidebar.file_uploader(&quot;Select Excel-File for cleansing&quot;,key=&quot;Raw_Data&quot;)
  
  
  
  if excelfile==None:
      st.balloons()
      
  
  
  
  tab1, tab2 = st.tabs([&quot;Sheet 1&quot;, &quot;Sheet 2&quot;])
  
  
  
  @st.cache()
  def load_sheet1():
      sheet1=pd.read_excel(excelfile,sheet_name=&quot;Sheet1&quot;)
      return sheet1
  
  @st.cache()
  def load_sheet2():
      sheet1=pd.read_excel(excelfile,sheet_name=&quot;Sheet2&quot;)
      return sheet1
  
  
  df=load_sheet1()
  with tab1:
      gd = GridOptionsBuilder.from_dataframe(df)
      gd.configure_pagination(enabled=True)
      gd.configure_default_column(editable=True, groupable=True)
      gd.configure_selection(selection_mode=&quot;multiple&quot;, use_checkbox=True)
      gridoptions = gd.build()
      grid_table = AgGrid(
          df,
          gridOptions=gridoptions,
          update_mode=GridUpdateMode.SELECTION_CHANGED,
          theme=&quot;material&quot;,
      )
  
  
  
  df1=load_sheet2()
  with tab2:
      gd = GridOptionsBuilder.from_dataframe(df1)
      gd.configure_pagination(enabled=True)
      gd.configure_default_column(editable=True, groupable=True)
      gd.configure_selection(selection_mode=&quot;multiple&quot;, use_checkbox=True)
      gridoptions = gd.build()
      grid_table = AgGrid(
          df1,
          gridOptions=gridoptions,
          update_mode=GridUpdateMode.SELECTION_CHANGED,
          theme=&quot;material&quot;,
      )
  
  
  </code></pre>
  <p>I also can share with you my test excel file:</p>
  <p>Sheet 1</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Col1</th>
  <th>Col2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>C</td>
  </tr>
  <tr>
  <td>B</td>
  <td>D</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Sheet 2</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Col3</th>
  <th>Col4</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>E</td>
  <td>G</td>
  </tr>
  <tr>
  <td>F</td>
  <td>H</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Any kind of support how to eliminate this issue would be more than awesome</p>