-
-
Notifications
You must be signed in to change notification settings - Fork 364
fix(AutoComplete): trigger OnValueChanged when the Value changed #5485
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
Conversation
Reviewer's Guide by SourceryThis pull request includes updates to the versioning, improvements to the Updated class diagram for AutoComplete componentclassDiagram
class AutoComplete {
-List<string> _filterItems
-int? DisplayCount
+Task TriggerFilter(string val)
+Task TriggerChange(string val)
}
note for AutoComplete "TriggerFilter method now calls TriggerChange instead of StateHasChanged()"
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- The removal of the
useInputcheck inAutoComplete.razor.jsseems correct, but could use a comment explaining why it's no longer needed. - Consider adding a brief explanation of why
TriggerChangeis preferred overStateHasChangedin theTriggerFiltermethod.
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5485 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 649 649
Lines 29541 29541
Branches 4163 4163
=========================================
Hits 29541 29541 ☔ View full report in Codecov by Sentry. |
Link issues
link #5479
link #5480
Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary By Copilot
This pull request includes updates to the versioning, improvements to the
AutoCompletecomponent, and some code cleanups. The most important changes include updating the project version, modifying theTriggerFiltermethod, and refining the JavaScript functions for theAutoCompletecomponent.Version update:
src/BootstrapBlazor/BootstrapBlazor.csproj: Updated the project version from9.4.3-beta02to9.4.3-beta03.Improvements to
AutoCompletecomponent:src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs: Modified theTriggerFiltermethod to callawait TriggerChange(val)instead ofStateHasChanged().JavaScript refinements:
src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.js: Removed unnecessary condition check foruseInputin theinitfunction.src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.js: Removed themenuvariable and added an event handler cleanup forchangeevent in thedisposefunction.Summary by Sourcery
Fixes an issue where the AutoComplete component's OnValueChanged event was not triggered when the value changed. This is achieved by calling TriggerChange(val) instead of StateHasChanged() in the TriggerFilter method. Additionally, this PR includes minor JavaScript code cleanup and a version update.
Bug Fixes:
useInputin theinitfunction of the AutoComplete component's JavaScript.menuvariable and adds an event handler cleanup for thechangeevent in thedisposefunction of the AutoComplete component's JavaScript.Enhancements: