Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify API docs for OnAfterRender #49519

Merged
merged 3 commits into from
Jul 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions src/Components/Components/src/ComponentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ protected virtual bool ShouldRender()
=> true;

/// <summary>
/// Method invoked after each time the component has been rendered.
/// Method invoked after each time the component has rendered interactively and the UI has finished
/// updating (for example, after elements have been added to the browser DOM). Any <see cref="ElementReference" />
/// fields will be populated by the time this runs.
///
/// This method is not invoked during prerendering or server-side rendering, because those processes
/// are not attached to any live browser DOM and are already complete before the DOM is updated.
/// </summary>
/// <param name="firstRender">
/// Set to <c>true</c> if this is the first time <see cref="OnAfterRender(bool)"/> has been invoked
Expand All @@ -141,9 +146,15 @@ protected virtual void OnAfterRender(bool firstRender)
}

/// <summary>
/// Method invoked after each time the component has been rendered. Note that the component does
/// not automatically re-render after the completion of any returned <see cref="Task"/>, because
/// that would cause an infinite render loop.
/// Method invoked after each time the component has been rendered interactively and the UI has finished
/// updating (for example, after elements have been added to the browser DOM). Any <see cref="ElementReference" />
/// fields will be populated by the time this runs.
///
/// This method is not invoked during prerendering or server-side rendering, because those processes
/// are not attached to any live browser DOM and are already complete before the DOM is updated.
///
/// Note that the component does not automatically re-render after the completion of any returned <see cref="Task"/>,
/// because that would cause an infinite render loop.
/// </summary>
/// <param name="firstRender">
/// Set to <c>true</c> if this is the first time <see cref="OnAfterRender(bool)"/> has been invoked
Expand Down