fix: remove st.rerun() from dialog nav buttons — caused dialog to close on Next/Back
Some checks failed
CI / test (pull_request) Has been cancelled
Some checks failed
CI / test (pull_request) Has been cancelled
This commit is contained in:
parent
a81cdc120b
commit
cddb2b6419
1 changed files with 4 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ def _feedback_dialog(page: str) -> None:
|
||||||
with col_cancel:
|
with col_cancel:
|
||||||
if st.button("Cancel"):
|
if st.button("Cancel"):
|
||||||
_clear_feedback_state()
|
_clear_feedback_state()
|
||||||
st.rerun()
|
st.rerun() # intentionally closes the dialog
|
||||||
with col_next:
|
with col_next:
|
||||||
if st.button(
|
if st.button(
|
||||||
"Next →",
|
"Next →",
|
||||||
|
|
@ -81,7 +81,7 @@ def _feedback_dialog(page: str) -> None:
|
||||||
or not st.session_state.get("fb_desc", "").strip(),
|
or not st.session_state.get("fb_desc", "").strip(),
|
||||||
):
|
):
|
||||||
st.session_state.fb_step = 2
|
st.session_state.fb_step = 2
|
||||||
st.rerun()
|
# no st.rerun() — button click already re-renders the dialog
|
||||||
|
|
||||||
# ═════════════════════════════════════════════════════════════════════════
|
# ═════════════════════════════════════════════════════════════════════════
|
||||||
# STEP 2 — Consent + attachments
|
# STEP 2 — Consent + attachments
|
||||||
|
|
@ -136,7 +136,7 @@ def _feedback_dialog(page: str) -> None:
|
||||||
)
|
)
|
||||||
if st.button("🗑 Remove screenshot"):
|
if st.button("🗑 Remove screenshot"):
|
||||||
st.session_state.pop("fb_screenshot", None)
|
st.session_state.pop("fb_screenshot", None)
|
||||||
st.rerun()
|
# no st.rerun() — button click already re-renders the dialog
|
||||||
|
|
||||||
# ── Attribution consent ───────────────────────────────────────────────
|
# ── Attribution consent ───────────────────────────────────────────────
|
||||||
st.divider()
|
st.divider()
|
||||||
|
|
@ -159,7 +159,7 @@ def _feedback_dialog(page: str) -> None:
|
||||||
with col_back:
|
with col_back:
|
||||||
if st.button("← Back"):
|
if st.button("← Back"):
|
||||||
st.session_state.fb_step = 1
|
st.session_state.fb_step = 1
|
||||||
st.rerun()
|
# no st.rerun() — button click already re-renders the dialog
|
||||||
|
|
||||||
with col_submit:
|
with col_submit:
|
||||||
if st.button("Submit Feedback", type="primary"):
|
if st.button("Submit Feedback", type="primary"):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue