revert(Select): add DefaultVirtualizeItemText parameter#5678
Merged
Conversation
Contributor
Reviewer's Guide by SourceryThis pull request introduces a new Sequence diagram for item retrieval in Select componentsequenceDiagram
participant Select Component
participant Rows
Select Component->Select Component: IsVirtualize ?
alt IsVirtualize is true
Select Component->Select Component: GetItemByVirtulized()
Select Component->Select Component: new SelectedItem(CurrentValueAsString, DefaultVirtualizeItemText ?? CurrentValueAsString)
Select Component-->>Select Component: Return SelectedItem
else IsVirtualize is false
Select Component->Select Component: GetItemByRows()
Select Component->Select Component: GetItemWithEnumValue()
Select Component->Rows: Find(i => i.Value == Convert.ToInt32(Value).ToString())
Select Component-->>Select Component: Return item or null
alt item is null
Select Component->Rows: Find(i => i.Value == CurrentValueAsString)
Select Component-->>Select Component: Return item or null
else item is not null
end
alt item is null
Select Component->Rows: Find(i => i.Active)
Select Component-->>Select Component: Return item or null
else item is not null
end
alt item is null
Select Component->Rows: FirstOrDefault(i => !i.IsDisabled)
Select Component-->>Select Component: Return item or null
else item is not null
end
Select Component-->>Select Component: Return item
end
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.
We encountered an error and are unable to review this PR. We have been notified and are working to fix it.
You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.
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.
Link issues
fixes #5677
Summary By Copilot
This pull request includes several changes to the
Selectcomponent and its related tests, focusing on virtualized items and default text handling. The most important changes include adding new properties, refactoring methods for item retrieval, and updating unit tests to cover new scenarios.Enhancements to
Selectcomponent:DefaultVirtualizeItemTextto set default text for virtualized items inSelect.razor.cs.GetItemByVirtulizedandGetItemByRowsto handle virtualized and non-virtualized items separately inSelect.razor.cs. [1] [2]Code cleanup:
DefaultVirtualizeItemTextparameter fromSelectBase.cs.Unit tests updates:
DisableItemChangedWhenFirstRender_OktoDisableItemChangedWhenFirstRender_Falseand added a new test methodDisableItemChangedWhenFirstRender_TrueinSelectTest.cs. [1] [2]DefaultVirtualizeItemText_Okto verify the behavior of theDefaultVirtualizeItemTextparameter inSelectTest.cs.OverscanCountparameter in theTreeViewTest.cstest methodIsVirtualize_Ok.Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Reverts the addition of the DefaultVirtualizeItemText parameter to the Select component and related changes.
Tests: