Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Loading For Component Time load #55409

Closed
MahdiElahi opened this issue Apr 27, 2024 · 2 comments
Closed

Loading For Component Time load #55409

MahdiElahi opened this issue Apr 27, 2024 · 2 comments
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@MahdiElahi
Copy link

i want use this topbar.js

but in blazor .net 8 how to show this topbar when user click on link forexample nav menu and how to hide after component load correctly

how to do it?
i dont want write code for show and hide topbar in any component

how to config for all components to show/hide topbar ?

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Apr 27, 2024
@maraf
Copy link
Member

maraf commented Apr 27, 2024

You can use NativationManager.RegisterLocationChangingHandler to show the loading state. Hiding it can be bound to NavigationManager.LocationChanged event, but individual components might be loading additional data and so hiding it when indivial component is done with loading data might be good idea.

I transfering the issue to the aspnetcore repository where Blazor folks can give more precise advice

@maraf maraf transferred this issue from dotnet/runtime Apr 27, 2024
@martincostello martincostello added area-blazor Includes: Blazor, Razor Components and removed untriaged needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Apr 27, 2024
@MahdiElahi
Copy link
Author

@maraf
please show a sample code
i want config globally for all components

@dotnet dotnet locked and limited conversation to collaborators Apr 29, 2024
@mkArtakMSFT mkArtakMSFT converted this issue into discussion #55422 Apr 29, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

3 participants