SelectTree有ShowSearch参数,漏掉OnSearchAsync参数补齐#7844
Open
Tony-ST0754 wants to merge 1 commit intomainfrom
Open
Conversation
SelectTree有ShowSearch参数,漏掉OnSearchAsync参数
|
Thanks for your PR, @Tony-ST0754. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds an async search callback parameter to SelectTree and wires it through to the underlying TreeView when search is enabled. Sequence diagram for SelectTree search with OnSearchAsyncsequenceDiagram
actor User
participant SelectTree_TValue_ as SelectTree~TValue~
participant TreeView_TValue_ as TreeView~TValue~
participant OnSearchAsyncHandler as OnSearchAsync_handler
User->>SelectTree_TValue_: type_search_text(query)
SelectTree_TValue_->>TreeView_TValue_: render_with(ShowSearch=true, OnSearchAsync)
User->>TreeView_TValue_: input_search_text(query)
TreeView_TValue_->>OnSearchAsyncHandler: OnSearchAsync(query)
OnSearchAsyncHandler-->>TreeView_TValue_: List<TreeViewItem<TValue>> results
TreeView_TValue_->>User: display_filtered_tree(results)
Class diagram for updated SelectTree OnSearchAsync parameterclassDiagram
class SelectTree~TValue~ {
+bool ShowSearch
+Func~string?, Task~List~TreeViewItem~TValue~~?~~~ OnSearchAsync
}
class TreeView~TValue~ {
+IEnumerable~TreeViewItem~TValue~~ Items
+bool ShowIcon
+bool ShowSearch
+bool ShowResetSearchButton
+bool CanExpandWhenDisabled
+string CustomKeyAttribute
+Func~string?, Task~List~TreeViewItem~TValue~~?~~~ OnSearchAsync
+Task OnTreeItemClick(TValue value)
+Task OnExpandNodeAsync(TreeViewItem~TValue~ node)
}
class TreeViewItem~TValue~ {
+TValue Value
+string Text
+bool IsExpanded
+bool IsDisabled
}
SelectTree~TValue~ --> TreeView~TValue~ : passes_OnSearchAsync
TreeView~TValue~ --> TreeViewItem~TValue~ : uses
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The newly added
using System.Timers;inSelectTree.razor.csis not used anywhere in this file and should be removed to avoid unnecessary dependencies.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The newly added `using System.Timers;` in `SelectTree.razor.cs` is not used anywhere in this file and should be removed to avoid unnecessary dependencies.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7844 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 764 764
Lines 34165 34166 +1
Branches 4704 4704
=========================================
+ Hits 34165 34166 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
SelectTree有ShowSearch参数,漏掉OnSearchAsync参数
Link issues
fixes #7843
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add asynchronous search callback support to SelectTree when search is enabled.
New Features:
Enhancements: