Skip to content

Commit c93d08b

Browse files
committed
fix(grid): initial selection not working
1 parent 5be70ce commit c93d08b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

testgen/ui/services/form_service.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,11 @@ def render_grid_select(
261261
selected_column, paginator_column = st.columns([.5, .5])
262262
with paginator_column:
263263
def on_page_change():
264-
st.session_state[f"{key}_page_change"] = True
264+
# Ignore the on_change event fired during paginator initialization
265+
if st.session_state.get(f"{key}_paginator_loaded", False):
266+
st.session_state[f"{key}_page_change"] = True
267+
else:
268+
st.session_state[f"{key}_paginator_loaded"] = True
265269

266270
page_index = testgen.paginator(
267271
count=len(df),

0 commit comments

Comments
 (0)