question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

force full render / avoid differential render flag

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I’m doing drag-and-drop using js, which does manipulate the DOM, and after StateHasChanged() it won’t render correctly.

I can avoid DOM manipulations (revert some necessary DOM changes) but this will create a blink effect after Drop.

Describe the solution you’d like

<div @ForceFullRender="@boolValue"></div>

Additional context

my current drag-and-drop where I avoid manipulating DOM, and getting Blink https://imgur.com/d0DX1A7

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
SteveSandersonMScommented, Sep 23, 2022

I understand, however couldn’t reasonably guarantee that Blazor will always notify you before everything it will do as we add more features in the future.

What you’re doing with mutating the DOM outside Blazor is definitely unsupported. However while you’re doing unsupported things, you could go further and patch Blazor._internal.renderBatch. For example:

<script src="blazor.webassembly.js" autostart="false"></script>
<script>
    // This is *very* unsupported and might not work in future versions
    const origRender = Blazor._internal.renderBatch;
    Blazor._internal.renderBatch = function() {
        console.log('Rendering now...');
        return origRender.apply(this, arguments);
    };
    Blazor.start();
</script>

Note that you have to use autostart=false like this to be able to patch the internals. At least I think this will work, but haven’t tested it.

0reactions
omuleanucommented, Sep 24, 2022

@SteveSandersonMS I managed to get refreshIndex method working, so no more blinking, now I’m binding the js from outside the refreshed div, kind of like $(document).on(event, selector, instead of $(selector).on(event The only problem now is that all the scrollbars go back to 0 after refresh, so I have to choose now between, blink and scrollbars reset.

Read more comments on GitHub >

github_iconTop Results From Across the Web

blazor force full render instead of differential render
I am trying to display images using this masonry js package but I am having difficulties. I have an image upload form. The...
Read more >
Render Flag & Display Flag | Forums
If you want lesser detail on the objects being instanced, you need to separate the display/render flags in the object that you're instancing, ......
Read more >
Hydration
Hydration is the process that restores the server side rendered application on the client. This includes things like reusing the server rendered DOM ......
Read more >
A High Quality Render of the Commonwealth Flag : r/Stellaris
The full render (not featured here) is a fully-animated, HD video of the Commonwealth flag waving in the breeze.
Read more >
Photon Parameterisation for Robust Relaxation Constraints - PMC
This paper presents a novel approach to detecting and preserving fine illumination structure within photon maps. Data derived from each photon's primal ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found