English 中文(简体)
简化投入-案文:删除工具
原标题:Streamlit input_text: remove tooltip
  • 时间:2023-03-19 15:41:55
  •  标签:
  • streamlit

我正在开发一个使用简化软件的网站,我正在使用<密码>_input功能。

When I am trying to input some data to the input text it always shows a grey tip "Press enter to apply". I added the below js code to prevent any action if the user presses enter by mistake since i will be using a submit button:

js_code = """
<script>
document.querySelector( .stTextInput ).addEventListener( keydown , function(e) {
if (e.keyCode === 13) { // 13 is the Enter key
            e.preventDefault();
}
});
</script>
"""

st.markdown(js_code, unsafe_allow_html=True)

如果任何人能够帮助我清除这一拖车,那么用户不会因无用活动而进入或失去时间,就会受到高度赞赏。

问题回答

引言

    hide_menu_style = """
        <style>
        [data-testid="InputInstructions"] { display:None }
        </style>
        """
    st.markdown(hide_menu_style, unsafe_allow_html=True)




相关问题
Shell script “dvc pull” not working at Streamlit server

In my Streamlit app.py file, I used the code os.system("dvc pull") to load a .csv data file (labeled_projects.csv) from my Google service account (Google Drive), and it has been working well ...

How to reduce line spacing in bulleted list in Streamlit?

How do I reduce the line spacing between bullet points in st.markdown? Code st.markdown( - Item 1 ) st.markdown( - Item 2 ) st.markdown( - Item 3 ) Current Output (would like to reduce the space as ...

How can I fix streamlit groupby.transform error?

df1 = pd.DataFrame({ value : [1, np.nan, np.nan, 2, 3, 1, 3, np.nan, 3], name : [ A , A , B , B , B , B , C , C , C ]}) df2 = pd.DataFrame({ value : [1, np.nan, np.nan, 2, 3, 1, 3, np.nan, 3], ...

• 如何将申请页打印成国防军档案?

我下面的这个简单例子在@MathCatsAnd的帮助下创立。 每一页都有多个数据基,简而言之,每一页仅显示一个数据基。 我谨......

2. 具有多吨和功能的精炼会议

我写了一个功能,用户可以提供URL,并宣传分析纽芬兰语。 在强制使用ton子方面,触发了繁琐的职能。 如果成功,则向用户呈报......

f string to pass file path issue

I have a function which accepts a file path. It s as below: def document_loader(doc_path: str) -> Optional[Document]: """ This function takes in a document in a particular ...