You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im working on an multi page application with tabs. I want to select multiple rows and get a list of the selected rows. When the users returns to the table I want to show the selected rows using pre_selected_rows.
But when get selected_rows it looks like the selection lags behind.
Looks to me for every selection i make table send two events, the original/old situation and the new situation.
Also it looks like the table keeps updating and looping sometimes.
Is this a bug? What is the correct way to do this? Has it to do with other incluences of multipage and tabs?
Im new to streamlit so I try now to test the most simple setup with a single page.
I now have added a button. When clicked i determine the selected rows and store in session state. This is a workaround for the somethwat strange behaviour. Now i can save selected rows and also show them when i switch between pages in a multipage App.
I see new errors in the browser log:
AG Grid: do not use api for selection, call node.setSelected(value) instead
t.selectIndex @ main.dc43edd4.js:2
AG Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it
Im working on an multi page application with tabs. I want to select multiple rows and get a list of the selected rows. When the users returns to the table I want to show the selected rows using pre_selected_rows.
But when get selected_rows it looks like the selection lags behind.
Looks to me for every selection i make table send two events, the original/old situation and the new situation.
Also it looks like the table keeps updating and looping sometimes.
Is this a bug? What is the correct way to do this? Has it to do with other incluences of multipage and tabs?
Im new to streamlit so I try now to test the most simple setup with a single page.
gb = GridOptionsBuilder.from_dataframe(df)
gb.configure_default_column(hide=True)
gb.configure_column("name",hide=False,width=300,tooltipField="name",
headerCheckboxSelection=True
)
gb.configure_column("branch",hide=False,width=150)
gb.configure_column("startDate",hide=False,width=90,type=["customDateTimeFormat"])
gb.configure_column("endDate",hide=False,width=90,type=["customDateTimeFormat"])
gb.configure_column("roles",hide=False,width=300,tooltipField="roles")
gb.configure_pagination(enabled=True,paginationPageSize=10,paginationAutoPageSize=False)
gb.configure_selection(use_checkbox=True,
selection_mode='multiple',
pre_selected_rows=selected_rows
)
gb.configure_grid_options(tooltipShowDelay=500)
table = AgGrid(df,
gridOptions=gb.build(),
enable_enterprise_modules=False,
update_mode=GridUpdateMode.SELECTION_CHANGED
)
selected_rows = [item['_selectedRowNodeInfo']['nodeRowIndex'] for item in table.selected_rows]
st.session_state[selected_name] = selected_rows
The text was updated successfully, but these errors were encountered: