Spaces:
Build error
Build error
page position fix
Browse files- ui_components.py +3 -1
ui_components.py
CHANGED
|
@@ -101,7 +101,9 @@ def render_main_content(locale, filtered_df):
|
|
| 101 |
# Настройки пагинации
|
| 102 |
per_page = 10 # Персонажей на странице
|
| 103 |
total_pages = max(1, (len(filtered_df) // per_page) + (1 if len(filtered_df) % per_page else 0))
|
| 104 |
-
|
|
|
|
|
|
|
| 105 |
# Управление пагинацией в колонках
|
| 106 |
col1, col2, _ = st.columns([2, 3, 5])
|
| 107 |
with col1:
|
|
|
|
| 101 |
# Настройки пагинации
|
| 102 |
per_page = 10 # Персонажей на странице
|
| 103 |
total_pages = max(1, (len(filtered_df) // per_page) + (1 if len(filtered_df) % per_page else 0))
|
| 104 |
+
if st.session_state.page >= total_pages:
|
| 105 |
+
st.session_state.page = 0
|
| 106 |
+
|
| 107 |
# Управление пагинацией в колонках
|
| 108 |
col1, col2, _ = st.columns([2, 3, 5])
|
| 109 |
with col1:
|