Update page_files/Categorized_Search.py
#2
by AbhijitClemson - opened
- page_files/Categorized_Search.py +15 -16
page_files/Categorized_Search.py
CHANGED
|
@@ -486,7 +486,7 @@ if st.session_state.selected_props:
|
|
| 486 |
|
| 487 |
filtered_meta = filtered_meta.reset_index(drop=True)
|
| 488 |
|
| 489 |
-
PAGE_SIZE =
|
| 490 |
total = len(filtered_meta)
|
| 491 |
total_pages = max(1, (total + PAGE_SIZE - 1) // PAGE_SIZE)
|
| 492 |
st.session_state.current_page = min(st.session_state.current_page, total_pages - 1)
|
|
@@ -583,21 +583,21 @@ with left_col:
|
|
| 583 |
st.session_state.current_page = 0
|
| 584 |
st.rerun()
|
| 585 |
|
| 586 |
-
st.markdown("<div class='aim-sec'>π Property Types</div>", unsafe_allow_html=True)
|
| 587 |
-
selected_props = []
|
| 588 |
-
with st.container(height=480):
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
|
| 593 |
|
| 594 |
-
|
| 595 |
-
|
| 596 |
|
| 597 |
-
if selected_props != st.session_state.selected_props:
|
| 598 |
-
|
| 599 |
-
|
| 600 |
-
|
| 601 |
|
| 602 |
if st.button(
|
| 603 |
"π Inspect",
|
|
@@ -694,8 +694,7 @@ with right_col:
|
|
| 694 |
columns=["Select", "Material Name", "Abbreviation", "Class", "Actions"]
|
| 695 |
)
|
| 696 |
|
| 697 |
-
|
| 698 |
-
table_df.loc[len(table_df)] = [False, "", "", "", ""]
|
| 699 |
|
| 700 |
editor_df = st.data_editor(
|
| 701 |
table_df,
|
|
|
|
| 486 |
|
| 487 |
filtered_meta = filtered_meta.reset_index(drop=True)
|
| 488 |
|
| 489 |
+
PAGE_SIZE = 50
|
| 490 |
total = len(filtered_meta)
|
| 491 |
total_pages = max(1, (total + PAGE_SIZE - 1) // PAGE_SIZE)
|
| 492 |
st.session_state.current_page = min(st.session_state.current_page, total_pages - 1)
|
|
|
|
| 583 |
st.session_state.current_page = 0
|
| 584 |
st.rerun()
|
| 585 |
|
| 586 |
+
#st.markdown("<div class='aim-sec'>π Property Types</div>", unsafe_allow_html=True)
|
| 587 |
+
#selected_props = []
|
| 588 |
+
#with st.container(height=480):
|
| 589 |
+
# for index, section in enumerate(all_sections):
|
| 590 |
+
# key = f"prop_check_{index}"
|
| 591 |
+
# if key not in st.session_state:
|
| 592 |
+
# st.session_state[key] = section in st.session_state.selected_props
|
| 593 |
|
| 594 |
+
# if st.checkbox(section, key=key):
|
| 595 |
+
# selected_props.append(section)
|
| 596 |
|
| 597 |
+
#if selected_props != st.session_state.selected_props:
|
| 598 |
+
# st.session_state.selected_props = selected_props
|
| 599 |
+
# st.session_state.current_page = 0
|
| 600 |
+
# st.rerun()
|
| 601 |
|
| 602 |
if st.button(
|
| 603 |
"π Inspect",
|
|
|
|
| 694 |
columns=["Select", "Material Name", "Abbreviation", "Class", "Actions"]
|
| 695 |
)
|
| 696 |
|
| 697 |
+
|
|
|
|
| 698 |
|
| 699 |
editor_df = st.data_editor(
|
| 700 |
table_df,
|