Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -568,17 +568,19 @@ def navigate_to_index():
|
|
568 |
# Check if the index is within the valid range
|
569 |
if 0 <= go_to_index < len(st.session_state.data):
|
570 |
st.session_state.current_index = go_to_index
|
571 |
-
st.experimental_rerun()
|
572 |
else:
|
573 |
st.info(f"{st.session_state.go_to} is not in the range of data.")
|
574 |
except ValueError:
|
575 |
st.error("The page number must be an integer.")
|
576 |
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
|
|
|
|
582 |
|
583 |
st.markdown(
|
584 |
"""<style>
|
|
|
568 |
# Check if the index is within the valid range
|
569 |
if 0 <= go_to_index < len(st.session_state.data):
|
570 |
st.session_state.current_index = go_to_index
|
571 |
+
#st.experimental_rerun()
|
572 |
else:
|
573 |
st.info(f"{st.session_state.go_to} is not in the range of data.")
|
574 |
except ValueError:
|
575 |
st.error("The page number must be an integer.")
|
576 |
|
577 |
+
col1, col2, col3 = st.columns([2, 2, 2])
|
578 |
+
with col2:
|
579 |
+
with st.form(key="nav_form"):
|
580 |
+
st.number_input("Go to Page: ", key="go_to", format="%.0f")
|
581 |
+
if st.form_submit_button("Go"):
|
582 |
+
navigate_to_index()
|
583 |
+
#st.form_submit_button("Go", on_click=navigate_to_index)
|
584 |
|
585 |
st.markdown(
|
586 |
"""<style>
|