-
-
Notifications
You must be signed in to change notification settings - Fork 363
doc(SelectGeneric): update IsEditable paraemeter sample code
#6135
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 GuideRefactored SelectGeneric to delegate editable-item insertion and reset logic to an asynchronous callback, and updated the sample to show how to pass TextConvertToValueCallback. Class Diagram: Updates to SelectGeneric and SelectGenerics SampleclassDiagram
class SelectGeneric~TValue~ {
+TextConvertToValueCallback: Func<string, Task<TValue?>>
#OnChange(ChangeEventArgs args) Task
}
class SelectGenerics {
+TextConvertToValueCallback(string v) Task<Foo>
-_genericItems: List<SelectedItem<Foo>>
-_selectedFoo: Foo
}
class Foo {
+Id: int
+Address: string
}
SelectGenerics ..> Foo : uses
SelectGenerics ..> SelectGeneric~Foo~ : configures & uses
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:
- Add a
<summary>documentation entry for the new TextConvertToValueCallback parameter in SelectGeneric.razor so its purpose and usage are clearly described. - Populate the en-US.json and zh-CN.json locale files with labels/descriptions for TextConvertToValueCallback so your samples remain fully localized.
- Consider throwing a clear exception or issuing a warning when IsEditable is true but TextConvertToValueCallback is not provided to help consumers catch misconfigurations early.
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 #6135 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 703 703
Lines 31073 31069 -4
Branches 4397 4397
=========================================
- Hits 31073 31069 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #6134
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Update the editable SelectGeneric sample to demonstrate asynchronous text-to-value conversion and adjust the component’s change logic to delegate item updates externally and restore the previous selection on null responses.
Bug Fixes:
Enhancements: