-
-
Notifications
You must be signed in to change notification settings - Fork 331
feat(MultiSelect): add IsVirtualize parameter #5652
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 virtualization support and a clearable option to the Sequence diagram for clearing value in MultiSelectsequenceDiagram
participant User
participant MultiSelect
User->>MultiSelect: Clicks clear icon
MultiSelect->>MultiSelect: OnClearValue()
MultiSelect->>MultiSelect: ClearSearchText()
MultiSelect->>MultiSelect: Invoke OnClearAsync()
alt OnQueryAsync is not null
MultiSelect->>Virtualize: RefreshDataAsync()
end
MultiSelect->>MultiSelect: Clear SelectedItems
MultiSelect-->>User: Updates UI
File-Level Changes
Assessment against 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:
- Consider extracting the common logic for handling virtualized items into a shared method or base class to avoid duplication between
MultiSelect
andSelect
components. - The
ClearIcon
andIsClearable
parameters have been moved toSelectBase
, so remove them fromSelectGeneric
as they are inherited.
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 #5652 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 653 654 +1
Lines 29387 29571 +184
Branches 4197 4207 +10
==========================================
+ Hits 29387 29571 +184 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This reverts commit eebd3c4.
Link issues
fixes #5645
Summary By Copilot
This pull request introduces several enhancements to the
MultiSelect
component in theBootstrapBlazor
library, focusing on adding virtualization support and improving the user interface with additional features like clearable options.Enhancements to
MultiSelect
component:src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor
: Added a new demo block to demonstrate the virtualization feature with options to toggle search, fixed search, and clearable settings.src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs
: InjectedIStringLocalizer<Foo>
for localization and added properties and methods to support virtualization and clearable features. [1] [2] [3] [4]Virtualization support:
src/BootstrapBlazor/Components/Select/MultiSelect.razor
: Introduced the use ofVirtualize
component for efficient rendering of large data sets, and added a clearable icon functionality. [1] [2] [3] [4] [5]src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs
: AddedOnQueryAsync
parameter for loading virtualized items, and implemented methods to handle virtualization and clearing values. [1] [2] [3] [4] [5] [6] [7]Clearable option:
src/BootstrapBlazor/Components/Select/Select.razor
: Updated the template to include the clearable icon in the dropdown menu.src/BootstrapBlazor/Components/Select/Select.razor.cs
: Added logic to manage the clearable state and icon display. [1] [2] [3] [4]Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Adds virtualization support to the MultiSelect component, improving performance with large datasets. Also introduces a clearable option to the MultiSelect and Select components, allowing users to easily clear selected values.
New Features: