-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
fix(MultiSelect): add StateHasChanged when call SetValue #4781
Conversation
…onent may not refresh
Reviewer's Guide by SourceryThis PR fixes a component refresh issue in the MultiSelect component by ensuring StateHasChanged is always called after value changes, regardless of whether there's a ValueChanged delegate. The change removes a conditional check that was preventing proper UI updates in certain scenarios, particularly within Table components. Sequence diagram for MultiSelect component refreshsequenceDiagram
actor User
participant MultiSelect
participant UI
User->>MultiSelect: Change value
MultiSelect->>UI: StateHasChanged()
UI-->>User: Refresh UI
note over MultiSelect: StateHasChanged is always called
note over UI: UI refreshes without conditional check
Class diagram for MultiSelect component changesclassDiagram
class MultiSelect {
- PreviousValue: string
+ SetValue()
}
note for MultiSelect "StateHasChanged is now always called in SetValue()"
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Thanks for your PR, @Ocrosoft. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Ocrosoft - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@Ocrosoft 感谢提交 PR 请根据上面提示键入命令 签署 CLA。谢谢啦 |
@microsoft-github-policy-service agree |
@Ocrosoft 感谢感谢签署 CLA 再帮忙点一下右上角 star 给项目一个星星。稍后我给讨论一下这个 PR |
…the component may not refresh" This reverts commit a376e15.
c17f00a
fix(MultiSelect): add StateHasChanged when call SetValue
删除了 MultiSelect 元素更改时对是否 StateHasChanged 调用的判断。
Issue
close #4782
Description
可能为此提交 8a8fa15#diff-07918ce1b66955e76da5cd0ffa38512cce984fa2a09735a60e0db37b45235527L4 引入。
可能有更好的解决方案,若有直接关闭 PR 即可。
最小 DEMO(基于示例工程)
Index.razor
Regression?
8.1.7 版本起存在此问题。
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Bug Fixes: