I recently upgraded to 1.28.1 and now the st.dataframe has the download button on the top.
I have an application where I should not allow the user to do that.
How can it be hidden?
Will I need another CSS trick?
Nothing was mentioned on the Docs:
I recently upgraded to 1.28.1 and now the st.dataframe has the download button on the top.
I have an application where I should not allow the user to do that.
How can it be hidden?
Will I need another CSS trick?
Nothing was mentioned on the Docs:
How about if users just copy paste the table.
That is not my point here. What I don’t want is to “advertise” the download by showing a button every time he moves the mouse over.
For now I need to hide the button.
Also having this issue! would love if there was a way to disable it. Users currently can’t copy and paste from it so just need to have them not be able to download as well.
I have the same issue. I have created some code with my database being displayed as a dataframe for inspection. the last thing I want to do is to allow the user to either download it or copy paste it. (a simple enable copy / download true/false would do)
Yes this essential, when some new feature is added in streamlit, there should be always both enable and disable in APIs.
/* For Removing download icon on dataframe */
[data-testid="stElementToolbar"] {
display: none;
}
where do you add this (data-testid)? in a markdown block?
Facing similar issue.
Yes, add the following code snippet to the page that contains your dataframe:
st.markdown(
"""
<style>
[data-testid="stElementToolbar"] {
display: none;
}
</style>
""",
unsafe_allow_html=True
)
Thank you! This worked for me as well; I really want to hide the obvious “download” button. Thanks!
Is there any solution to hide search/download, without using unsafe_allow_html = True.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.