Repository navigation
[dev-v5] Add a global observeAttributeChange JS method - #3230
Merged
Denis Voituron (dvoituron) merged 3 commits intoJan 22, 2025
Merged
Conversation
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
January 22, 2025 16:30
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.1%
|
Denis Voituron (dvoituron)
enabled auto-merge (squash)
January 22, 2025 16:36
Vincent Baaij (vnbaaij)
approved these changes
Jan 22, 2025
Denis Voituron (dvoituron)
deleted the
users/dvoituron/dev-v5/attribute-changes
branch
January 22, 2025 17:06
This was referenced Sep 28, 2026
Closed
Merged
Merged
Closed
This was referenced Oct 14, 2026
Closed
Closed
This was referenced Oct 28, 2026
Closed
This was referenced Nov 9, 2026
This was referenced Nov 23, 2026
Closed
Closed
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.
[dev-v5] Add a global
observeAttributeChangeJS methodMany HTML input components and FluentUI Web Component v3 do not reflect attribute changes (e.g.
value) when these are changed by Blazor.This
observeAttributeChangeJS function registers an observer on the specified element to detect the change in the corresponding JS object.Parameters:
elementThe element to observe.attributeNameThe name of the attribute to observe.propertyTypeOptional. The type of the property to update (default isstring).propertyNameOptional. The name of the property to update (default is theattributeName).forceRefreshOptional. If true, all properties will be refreshed when the attribute changes (default isfalse).Returns
trueif the observer was added,falseif the observer was already added.Example:
Usage
Using this global function, the
FluentTextInputcan be simplified toAnd the
FluentCheckboxcan register the observers: