I have nodes as below where I need user to fill up text if “Others” were checked. Unfortunately, I have more than one “Others” and it is not allowed by streamlit. I comment it out to and the input text of Others is display above the tree-select (supposed display below the “Trading”) as shown in the picture below. Is there any way I can display it in correct location?
Secondly, the “Service Supplier” although is checked (sub tree under Service Supplier not fully checked), it is not recorded in dict of “checked” and only recorded as “expanded”. It will be a issue as expanded doesn’t mean is checked (as per picture)
nodes = [
{"label": "Material Supplier", "value": "Material Supplier"},
{
"label": "Service Supplier",
"value": "Service Supplier",
"children": [
{"label": "Automation", "value": "Automation"},
{"label": "Engineering", "value": "Engineering"},
{"label": "Logistics", "value": "Logistics"},
{"label": "Management", "value": "Management"},
{"label": "Consulting", "value": "Consulting"},
{"label": "Trading", "value": "Trading"},
{"label":"Others","value": st.text_input(label="Others",key="1")},
],
},
{
"label": "Steel User",
"value": "Steel User",
"children": [
{"label": "Roll Formers", "value": "Roll Formers"},
{"label": "Coil Service Centres", "value": "Coil Service Centres"},
{"label": "Fabricators", "value": "Fabricators"},
#{"label":"Others","value": st.text_input(label="Others",key="2")},
],
},