8000 GitHub - antglesic/MultiSelectPackage: Blazor MultiSelection component
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

antglesic/MultiSelectPackage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MultiSelectPackage

A lightweight, customizable Multiselect component built with Blazor. Easily select multiple options from a dropdown with support for search, custom templates, and more.

✨ Features

βœ… Select multiple options from a dropdown

πŸ” Optional search/filter support

🎨 Customizable item templates

🧩 Supports binding to complex data types

πŸš€ Getting Started

Installation

  1. Add the following to your _Imports.razor file:
    @using MultiSelectPackage.Components

Usage

See the project MultiSelectPackage for more examples of how to use the component

MultiSelect dropdown

<MultiSelect T="DummyDataDto"
	Items="DummyData"
	DisplayProperty="FullName"
	IdentifierProperty="Id"
	ValuesChanged="OnSelectedItemsChanged"
	CanSearch="true"
	SearchPlaceHolder="Search..."
	CustomStyle=""
	Width="35%" />

When your Item looks like this:

public class DummyDataDto
{
	public int Id { get; set; }
	public string Name { get; set; } = string.Empty;
	public string Surname { get; set; } = string.Empty;
	public string FullName
	{
		get
		{
			return $"{Name} {Surname}";
		}
	}
}

And your OnSelectedItemsChanged method looks like this:

public void OnSelectedItemsChanged(List<DummyDataDto> items)
{
	try
	{
		selectedItems = items;
	}
	catch (Exception ex)
	{
		Console.WriteLine(ex.Message);
	}
}

Screenshots

Dropdown closed

Dropdown closed

Dropdown opened

Dropdown opened

Dropdown with selected items

Dropdown selected items

Dropdown with filtered items #1

Dropdown filtered 1

Dropdown with filtered items #2

Dropdown filtered 2

Dropdown functionality to remove selected items

Dropdown remove item

Releases

No releases published

Packages

No packages published
0