Skip to content

Commit

Permalink
fix(ui): send the selection ID to AGgrid
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-dk committed Oct 28, 2024
1 parent 7555216 commit eb3f71a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testgen/ui/services/form_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,10 +872,10 @@ def render_grid_select(
pre_selected_rows: typing.Any = {}
if bind_to_query_name and bind_to_query_prop:
bound_value = st.query_params.get(bind_to_query_name)
bound_items_indexes = df[df[bind_to_query_prop] == bound_value].index
if len(bound_items_indexes) > 0:
bound_items = df[df[bind_to_query_prop] == bound_value]
if len(bound_items) > 0:
# https://github.com/PablocFonseca/streamlit-aggrid/issues/207#issuecomment-1793039564
pre_selected_rows = {str(bound_items_indexes[0]): True}
pre_selected_rows = {str(bound_items.iloc[0][bind_to_query_prop]): True}
else:
if data_changed and st.query_params.get(bind_to_query_name):
rendering_counter += 1
Expand Down

0 comments on commit eb3f71a

Please sign in to comment.