[New Component] MultiSelect input with search (also usable as searchable single select)

Đang mở
#1,338 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
12/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
bootstrap, csharp
Lĩnh vực
frontend

Hướng nghiên cứu

The target location is blazorbootstrap/Components/Form/MultiSelectInput/, which does not exist yet, so start by reading the existing form input components in blazorbootstrap/Components/Form/ and the docs page pattern under docs/docs/04-forms/. This is a large multi-part feature with a contested scope, so it is better suited to a maintainer discussion than a first contribution. Done would mean the v1 checklist in the issue is met, which is well beyond a single change.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area-autocomplete area-forms area-multi-select new component

Summary

Add a MultiSelectInput<TItem, TValue> dropdown component with built-in search, select-all, chip display, grouping, and virtualization. A single-selection mode covers the "searchable select" request.

Motivation

This is the most requested missing component, both in this repository and across the Blazor UI ecosystem:

  • Search inside select control — #559
  • Select component with filter — #1133
  • Allow AutoComplete to function as a dropdown — #1144
  • Dropdown with search field — #579, #854

Proposed API (draft)

<EditForm Model="filter">
    <MultiSelectInput TItem="Employee" TValue="int"
                      Data="employees"
                      TextField="e => e.Name"
                      ValueField="e => e.Id"
                      GroupBy="e => e.Department"
                      @bind-Value="filter.EmployeeIds"
                      AllowSearch="true" ShowSelectAll="true"
                      SelectedDisplay="MultiSelectDisplay.Chips" />
</EditForm>

<MultiSelectInput TItem="Country" TValue="string" SelectionMode="MultiSelectMode.Single"
                  DataProvider="CountriesProvider" @bind-SelectedValue="countryCode" />

Must-have features (v1)

  • Multiple mode: Value / ValueChanged / ValueExpression as IEnumerable<TValue> with EditForm validation.
  • Single mode: SelectedValue binding — searchable replacement for <select>.
  • Data sources: Data (client-side filter) and DataProvider (server-side search with debounce and loading indicator).
  • Search box inside the dropdown (AllowSearch), with FilterOperator (Contains, StartsWith).
  • Select all / Clear all; MaxSelectedItems.
  • SelectedDisplay (MultiSelectDisplay: Chips with remove buttons, Count summary "3 selected", Comma list).
  • Option grouping (GroupBy), disabled options (DisabledSelector), ItemTemplate.
  • Virtualization for large data sets.
  • Size (MultiSelectInputSize), Disabled, Placeholder, ShowClearButton.
  • Dropdown positions correctly inside Modal, Offcanvas, and scrollable containers.
  • Search input stays responsive on Blazor Server under latency (see #407 / #1247).

Accessibility

  • Combobox + listbox ARIA pattern; aria-multiselectable in multiple mode.
  • Arrow keys, Home/End, Enter/Space to toggle, Escape to close, type-ahead.
  • Selected count announced via a polite live region.

Out of scope (later)

  • Creating a new option from search text.
  • Cascading selects.

Acceptance criteria

  • Component in blazorbootstrap/Components/Form/MultiSelectInput/.
  • XML docs on all public parameters and events.
  • Demo page covering: multiple, single searchable, client data, server data provider, grouping, select all, max items, display modes, templates, disabled options, virtualization, inside Modal, EditForm validation.
  • Verified in Server and WebAssembly demo hosts.
  • Docs page docs/docs/04-forms/multi-select-input.mdx.
  • Builds for .NET 8, 9, 10.

Related

#559, #1133, #1144, #579, #854, #574

Ngôn ngữ chính
HTML
Star
1.2k
Fork
111
Merge trung bình
4 phút
Pull request đã merge (30 ngày)
55

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của vikramlearning/blazorbootstrap

Tất cả issue của vikramlearning/blazorbootstrap

Issue tương tự

Thêm issue về Web Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.