Update page_files/Categorized_Search.py
Browse files
page_files/Categorized_Search.py
CHANGED
|
@@ -547,6 +547,7 @@ with left_col:
|
|
| 547 |
matrix_options = ["All"] + sorted([item for item in composite_meta["Matrix"].dropna().unique() if item])
|
| 548 |
fiber_options = ["All"] + sorted([item for item in composite_meta["Fiber"].dropna().unique() if item])
|
| 549 |
|
|
|
|
| 550 |
st.markdown("<div class='aim-lbl'>🧱 Matrix</div>", unsafe_allow_html=True)
|
| 551 |
matrix_value = st.selectbox(
|
| 552 |
"Matrix",
|
|
@@ -555,7 +556,8 @@ with left_col:
|
|
| 555 |
if st.session_state.selected_matrix in matrix_options
|
| 556 |
else 0,
|
| 557 |
key="matrix_select",
|
| 558 |
-
|
|
|
|
| 559 |
)
|
| 560 |
|
| 561 |
st.markdown("<div class='aim-lbl'>🧵 Fiber</div>", unsafe_allow_html=True)
|
|
@@ -567,6 +569,8 @@ with left_col:
|
|
| 567 |
else 0,
|
| 568 |
key="fiber_select",
|
| 569 |
label_visibility="collapsed",
|
|
|
|
|
|
|
| 570 |
)
|
| 571 |
|
| 572 |
if matrix_value != st.session_state.selected_matrix:
|
|
|
|
| 547 |
matrix_options = ["All"] + sorted([item for item in composite_meta["Matrix"].dropna().unique() if item])
|
| 548 |
fiber_options = ["All"] + sorted([item for item in composite_meta["Fiber"].dropna().unique() if item])
|
| 549 |
|
| 550 |
+
composition_disabled = st.session_state.active_classes not in [[], ["Composites"]]
|
| 551 |
st.markdown("<div class='aim-lbl'>🧱 Matrix</div>", unsafe_allow_html=True)
|
| 552 |
matrix_value = st.selectbox(
|
| 553 |
"Matrix",
|
|
|
|
| 556 |
if st.session_state.selected_matrix in matrix_options
|
| 557 |
else 0,
|
| 558 |
key="matrix_select",
|
| 559 |
+
disabled=composition_disabled,
|
| 560 |
+
|
| 561 |
)
|
| 562 |
|
| 563 |
st.markdown("<div class='aim-lbl'>🧵 Fiber</div>", unsafe_allow_html=True)
|
|
|
|
| 569 |
else 0,
|
| 570 |
key="fiber_select",
|
| 571 |
label_visibility="collapsed",
|
| 572 |
+
disabled=composition_disabled,
|
| 573 |
+
|
| 574 |
)
|
| 575 |
|
| 576 |
if matrix_value != st.session_state.selected_matrix:
|