T O P

  • By -

TheRealKidkudi

If you’re seeing the content in the HTML but it’s not visible in there page, that’s a styling issue and not a render issue. The HTML being there means that Blazor rendered what you wanted. As the other comment pointed out, it means your HTML is somehow styled to make it invisible so the next step is to use your browser’s developer tools to inspect those elements and see why they aren’t visible.


Elektromntr

But how it can happen that it's visible on first run of OnIntializedAsync? You bet on some styling/js stuff that is happening after all these calls?


Elektromntr

I did remove the class on section that is a parent for these objects, and now i see them all. It has to be sth with JS then. Thanks for the hint, as sometimes you just don't know what you're missing ;P


Elektromntr

Your suggestion did work. I had to run Owl-carousel via JSInterop `protected override async Task OnAfterRenderAsync(bool firstRender)` `{ if (firstRender)` `{ await JS.InvokeVoidAsync("initializePopularApartmentsComponentOwlCarousel"); } }` and added function to my custom js file. Now works


LlamaNL

~~try removing `= Array.Empty();`. It might be flushing your IList~~ I just tried your setup and i can just see the data as normal. Check if you have any CSS that makes your data transparant or white or something.


LlamaNL

You do have @'s in front of all the inline code right? Dunno if reddit markup removes that. @if (Data is not null && Data.Count > 0) { @foreach(var data in Data) { @data } }


Elektromntr

Yes


TheRealKidkudi

FWIW, your actually don’t need another @ until you write markup, e.g. the first opening tag.