updates on create_visualisations page in microgrowth to make the sele… - #51
Merged
Conversation
…cted plotting parameters persist between pages
enryH
reviewed
Jul 6, 2026
| pre_selected_rows = [idx for idx, sid in enumerate(ids) if sel.get(sid, False)] | ||
|
|
||
| # Re-check stored selection on (re)mount; pre_selected_rows is unreliable. | ||
| grid_options["getRowId"] = JsCode( |
Collaborator
There was a problem hiding this comment.
so you only use Javascript code to check the stored variables? I find it a bit weird to see that here
enryH
reviewed
Jul 6, 2026
…rid when reloading the table
sambra95
force-pushed
the
make_plot_parameters_consistent
branch
from
July 10, 2026 06:30
f79b2ba to
1e12cbf
Compare
Collaborator
|
Is this ready? |
Drop the JsCode-based re-check of preselected AgGrid rows on mount (flagged in review as odd to see JS for this). Instead, only persist the checked rows into session state when the user clicks a "Save selection" button, so navigating away and back no longer wipes the saved selection just because the grid remounts unchecked.
sambra95
commented
Jul 16, 2026
sambra95
left a comment
Collaborator
Author
There was a problem hiding this comment.
i agree that the js solution is clunky. this solution does not work. the selected rows are not saved when i navigate to a different page and back again - even when i click the selection button
The previous "Save selection" button still read live state off an AgGrid component, which remounts unchecked on page navigation - so clicking Save after navigating back silently wrote an empty selection over the previously saved one. st.data_editor is a first-party Streamlit widget whose checked state is rebuilt from session state on every render, so it reflects the saved selection correctly right after navigating back, and Save now reliably captures what's shown. Also drops the now-unused streamlit-aggrid dependency.
…ith multiselect. remove aggrid dependency
enryH
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
updated create_visualizations page to save plotting parameters in session state so that they persist between pages