Skip to content

Commit

Permalink
feat: add custom value input for target selection in data transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovler-Young committed Nov 30, 2024
1 parent 55f5c26 commit 965af17
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ia_collection_analyzer/streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,18 @@ def transform_data():
available_targets = [
v for v in formatted_values if v not in st.session_state.used_values
]
available_targets.append("Custom value...")

target_value = st.selectbox(
"Target Value:", available_targets, key="target_value", on_change=None
"Target Value:", available_targets, key="target_value"
)

if target_value == "Custom value...":
custom_target = st.text_input(
"Enter custom value:", key="custom_target"
)
target_value = f"{custom_target} (custom)"

with col3:
if st.button("Add", key="add_mapping"):
if target_value and selected_sources:
Expand Down

0 comments on commit 965af17

Please sign in to comment.