Closed ericpincus closed 10 months ago
Thanks for the report - will take a look when I get a chance
@ericpincus I believe this is the case because OnAfterRender is not called in Blazor Server (https://learn.microsoft.com/en-us/aspnet/core/blazor/components/lifecycle?view=aspnetcore-8.0). Make sure the container is rendered in the DOM before calling the masonry init code.
Closing, feel free to reopen if you have more info, thanks!
Thank you! My schedule is a bit overwhelmed on other tasks but I’ll re-open if I can’t get things rolling - EP
From: Jake Soenneker @.> Sent: Tuesday, December 5, 2023 4:45 PM To: soenneker/soenneker.blazor.masonry @.> Cc: ericpincus @.>; Mention @.> Subject: Re: [soenneker/soenneker.blazor.masonry] Doesn't Work on BlazorServer with @attribute [RenderModeServer] (Issue #45)
Closing, feel free to reopen if you have more info, thanks!
— Reply to this email directly, view it on GitHub https://github.com/soenneker/soenneker.blazor.masonry/issues/45#issuecomment-1841889144 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEUCQEXQI62WPCSHDJPF23YH65YHAVCNFSM6AAAAAA4R34PDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBRHA4DSMJUGQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AQEUCQARU3VLPF3UVTR4DV3YH65YHA5CNFSM6AAAAAA4R34PDOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTNZD7XQ.gif Message ID: @. @.> >
The tool works as designed with the following at the top of the page: @page "/test" @using Soenneker.Blazor.Masonry.Abstract
But then, if I add this line: @attribute [RenderModeServer]
@page "/test" @using Soenneker.Blazor.Masonry.Abstract @attribute [RenderModeServer]
It does not function as designed. I need that RenderModeServer line for other purposes.
Via the console, I see the following message:
Bad element for masonry: .container r @ masonry.pkgd.min.js:9
This error is not present when I remove the attribute above.
Thank you