I have read this posts.
How to display long text in Streamlit dataframes with automatic line breaks?
However, this post uses dataframe, and I want to know how to use the data_editor to wrap text.
This is my code.
new_data = rename_data.drop(columns=["account", "id"])
st.data_editor(
new_data.to_html(escape=False),
key="my_key",
column_config={
"ๅ้ฅ้กๅ": st.column_config.SelectboxColumn(
help="choose the reason",
width="medium",
options=[
"ๅๅ A",
"ๅๅ B",
"ๅๅ C",
"ๅ
ถไปๅๅ ",
],
required=True,
),
},
disabled=["ๅ้ก้กๅ", "ๅ้กๅ
งๅฎน", "ๆฉๅจไบบๅ่ฆๅ
งๅฎน", "ๆๅพๆดๆฐๆ้"],
hide_index = True,
)
change_btn = st.button("็ขบ่ช่ฎๆด")
if change_btn:
edit = st.session_state["my_key"]['edited_rows']