-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueStatus: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Description
When adding @onmousemove=MouseHasMoved
to an element Blazor will re-render the component every time the MouseHasMoved
method finishes executing.
Preventing this using ShouldRender
is tricky, because the component might need to render for other reasons, and having to set some state for every scenario that causes a re-render is labourious.
Could we have a way of telling Blazor not to add a call to StateHasChanged. Perhaps something like this
@onmousemove:preventStateHasChanged
@onmousemove:preventStateHasChanged=true
@onmousemove:preventStateHasChanged=LeftMouseButtonIsHeldDown
zHaytam and jbomhold3
Metadata
Metadata
Assignees
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueStatus: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components