2. 使用 Items 作为数据源
-
+
diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj
index 96f50b58957..259def325b9 100644
--- a/src/BootstrapBlazor/BootstrapBlazor.csproj
+++ b/src/BootstrapBlazor/BootstrapBlazor.csproj
@@ -1,7 +1,7 @@
- 9.5.0-beta01
+ 9.5.0-beta02
diff --git a/src/BootstrapBlazor/Components/Select/MultiSelect.razor b/src/BootstrapBlazor/Components/Select/MultiSelect.razor
index 7437536e7d2..544c6b2e08e 100644
--- a/src/BootstrapBlazor/Components/Select/MultiSelect.razor
+++ b/src/BootstrapBlazor/Components/Select/MultiSelect.razor
@@ -1,6 +1,7 @@
@namespace BootstrapBlazor.Components
+@using Microsoft.AspNetCore.Components.Web.Virtualization
@typeparam TValue
-@inherits SelectBase
+@inherits SimpleSelectBase
@attribute [BootstrapModuleAutoLoader("Select/MultiSelect.razor.js", JSObjectReference = true)]
@if (IsShowLabel)
@@ -48,6 +49,10 @@
}
+ @if (GetClearable())
+ {
+
+ }
}
- @if (Rows.Count == 0)
+ @if (IsVirtualize)
+ {
+
+ @if (OnQueryAsync == null)
+ {
+
+
+ }
+ else
+ {
+
+
+ }
+
+ }
+ else if (Rows.Count == 0)
{
@NoSearchDataText
}
@@ -91,28 +112,50 @@
}
@foreach (var item in itemGroup)
{
-
-
-
-
-
- @if (ItemTemplate != null)
- {
- @ItemTemplate(item)
- }
- else if (IsMarkupString)
- {
- @((MarkupString)item.Text)
- }
- else
- {
-
@item.Text
- }
-
-
+ @RenderRow(item)
+ }
+
+ if (!string.IsNullOrEmpty(itemGroup.Key))
+ {
+ if (GroupItemTemplate != null)
+ {
+ @GroupItemTemplate(itemGroup.Key)
+ }
+ else
+ {
+
+ }
}
}