New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component similar to Loader #57
Comments
Hi @Roh-codeur, based on the issue you had created previously (#40), I added LoadingOverlay as the dmc counterpart for dcc.Loading. Is this not what you are looking for? |
@snehilvj Say, I have a container which loads data table on page load.
Sorry, if I misunderstood how the control should be used. I am still learning and this library is a great help Thanks! |
LoadingOverlay does allow you to have loading indication on page load. For example have a look at this: import time
import dash
import pandas as pd
from dash import Input, Output, dash_table, dcc, html
import dash_mantine_components as dmc
app = dash.Dash(__name__)
df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/solar.csv")
app.layout = html.Div(
[
dcc.Location(id="url", refresh=False),
dmc.LoadingOverlay(id="page-content", style={"height": 300}),
]
)
@app.callback(Output("page-content", "children"), Input("url", "pathname"))
def display_page(pathname):
time.sleep(3)
return dash_table.DataTable(
df.to_dict("records"), [{"name": i, "id": i} for i in df.columns]
)
if __name__ == "__main__":
app.run_server(debug=True) |
ahh, thanks buddy! I see what you have done. super! |
Hi
Thanks for putting this together and your help earlier with Loader. May I request for a loader component similar to the below. The one you helped with earlier, seems to work with a Button. I now have a requirement to show loader when, say, the page/tab loads. One option is to use Skeleton, however, I feel Loader looks better
https://dash.plotly.com/dash-core-components/loading
please do let me know if there is a way to achieve this and sorry if I missed anything
Thanks
The text was updated successfully, but these errors were encountered: