Skip to content
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

Page shows element before animation on Blazor Server #22

Open
baktay opened this issue Nov 10, 2022 · 1 comment
Open

Page shows element before animation on Blazor Server #22

baktay opened this issue Nov 10, 2022 · 1 comment

Comments

@baktay
Copy link

baktay commented Nov 10, 2022

I am trying to use Blazor.Animate on Blazor Server page.

I have a div element to ZoomIn with small delay and duration. The element appears when browser first loads before the animation.
I need it not to be visible only with animation, and not when page loads to browser.

I tried it with other elements and even plain text. All animations like FadeIn, SlideIn etc. all behave the same way.
I see the element, and then it starts animating (I see the element on page without animation, and then it disappears and then animation starts from beginning - creating sort of flicker).

This does not happen on browser refresh but only first time when browser goes to the page url.

How can I prevent browser from showing the object before animation begins - at initial browser display ?

@baktay baktay changed the title Inital Page on Blazor Server Page shows element before animation on Blazor Server Nov 10, 2022
@gabrieldelaparra
Copy link

Hi @baktay, I think that it would be possible to call the method via Run() inside the OnAfterRenderAsync. Would this work?

https://learn.microsoft.com/en-us/aspnet/core/blazor/components/lifecycle?view=aspnetcore-7.0#after-component-render-onafterrenderasync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants