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

Ouverte
#1,338 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
12/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
bootstrap, csharp
Domaine
frontend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
HTML
Étoiles
1.2k
Forks
111
Merge moyen
4 min
PR mergées (30 j)
55

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de vikramlearning/blazorbootstrap

Toutes les issues de vikramlearning/blazorbootstrap

Issues similaires

Plus d'issues Web Dev

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.