fix: resolve infinite render loop for dropdowns inside Dialog - #122
Merged
Conversation
whis
pushed a commit
to whis/ui
that referenced
this pull request
Jul 19, 2026
…K window (blazorblueprintui#418) On Blazor Server, BbCategoryPortalHost dropped portal content-only notifications (RefreshPortal, same portal id) that arrived while _isRendering was latched across the render→ACK round-trip, and the post-render catch-up only re-rendered on portal key-set changes — so a Dialog/Sheet whose owner updated state faster than one SignalR ACK froze on stale content. Regression of the blazorblueprintui#118/blazorblueprintui#119 class reintroduced by blazorblueprintui#122. Record a deferred re-render for content-only drops and flush it through a coalesced, yield-deferred pass: - _pendingRerender recovers the dropped update - _isFlushing suppresses refreshes raised by the flush's own render so a nested same-category portal (e.g. Select-in-Popover) cannot loop - _flushScheduled + Task.Yield run the flush as a fresh dispatcher work item, never a synchronous nested re-render (which stack-overflows on WebAssembly), with a disposed guard on the fire-and-forget continuation Structural (register/unregister) recovery stays synchronous, unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PortalHostthat froze WASM apps when opening dropdown controls (Select, Combobox, MultiSelect) inside a Dialog_pendingRerenderflag with structural change detection — compares rendered portal keys against the current portal set after each render cycle to distinguish between redundantRefreshPortalcalls (ignored) and actual register/unregister changes (triggers re-render)