-
-
Notifications
You must be signed in to change notification settings - Fork 364
revert(Select): add DefaultVirtualizeItemText parameter #5678
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 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
|
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.
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.
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: