Soenneker.Blazor.TomSelect 2.1.304

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Blazor.TomSelect --version 2.1.304
NuGet\Install-Package Soenneker.Blazor.TomSelect -Version 2.1.304
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Blazor.TomSelect" Version="2.1.304" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Blazor.TomSelect --version 2.1.304
#r "nuget: Soenneker.Blazor.TomSelect, 2.1.304"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Soenneker.Blazor.TomSelect as a Cake Addin
#addin nuget:?package=Soenneker.Blazor.TomSelect&version=2.1.304

// Install Soenneker.Blazor.TomSelect as a Cake Tool
#tool nuget:?package=Soenneker.Blazor.TomSelect&version=2.1.304

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Blazor.TomSelect

A Blazor interop library for the select user control library, Tom Select

This library simplifies the integration of Tom Select into Blazor applications, providing access to options, methods, plugins, and events. A demo project showcasing common usages is included.

Diligence was taken to align the Blazor API with JS. Refer to the Tom Select documentation for details.

Installation

dotnet add package Soenneker.Blazor.TomSelect

1. Add the following to your _Imports.razor file

@using Soenneker.Blazor.TomSelect

2. Add the following to your Startup.cs file

public void ConfigureServices(IServiceCollection services)
{
    services.AddTomSelect();
}

3. Add the stylesheet to your wwwroot/index.html file

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tom-select/dist/css/tom-select.bootstrap5.min.css">

4. Add the scripts to your wwwroot/index.html file

<script src="https://cdn.jsdelivr.net/npm/tom-select/dist/js/tom-select.complete.min.js"></script>
<script src="_content/Soenneker.Blazor.TomSelect/tomselectinterop.js"></script>

Usage

<TomSelect
    TItem="Country" TType="string" OnItemAdd="OnItemAdd"
    Data="@_countries"
    TextField="@(item => item.Name)"
    ValueField="@(item => item.Id.ToString())" @ref="_tomSelect" Items="_selectedCountries">
</TomSelect>

@code{
    private TomSelect<Country, string> _tomSelect = default!;

    private List<Country>? _selectedCountries;
    private List<Country>? _countries;

    protected override async Task OnInitializedAsync()
    {
        _countries = await Http.GetFromJsonAsync<List<Country>>("sample-data/countries.json");
    }

    private void OnItemAdd((string str, TomSelectOption obj) result)
    {
        Logger.LogInformation("OnItemAdd fired: Value: {value}", str);
    }

    private void LogSelectedItems()
    {
        foreach (Country item in _tomSelect.Items)
        {
            Logger.LogInformation("Selected item: {0}", item.Name);
        }
    }
}

⚠️ While a lot of the Tom Select library has been implemented, there are features not yet supported. If you need assistance or want to request a new feature, please open an issue or submit a pull request.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.366 52 5/3/2024
2.1.365 63 5/1/2024
2.1.364 57 5/1/2024
2.1.363 76 4/30/2024
2.1.362 82 4/30/2024
2.1.361 91 4/30/2024
2.1.360 83 4/30/2024
2.1.359 83 4/30/2024
2.1.358 82 4/30/2024
2.1.357 85 4/30/2024
2.1.356 85 4/30/2024
2.1.355 79 4/30/2024
2.1.354 81 4/30/2024
2.1.353 86 4/30/2024
2.1.352 80 4/30/2024
2.1.351 78 4/30/2024
2.1.350 80 4/30/2024
2.1.349 79 4/30/2024
2.1.348 88 4/30/2024
2.1.347 76 4/30/2024
2.1.346 89 4/29/2024
2.1.345 74 4/29/2024
2.1.344 81 4/29/2024
2.1.343 74 4/29/2024
2.1.342 75 4/29/2024
2.1.341 77 4/29/2024
2.1.340 80 4/29/2024
2.1.339 81 4/29/2024
2.1.338 74 4/29/2024
2.1.337 80 4/29/2024
2.1.336 75 4/29/2024
2.1.335 79 4/29/2024
2.1.334 83 4/29/2024
2.1.333 83 4/28/2024
2.1.332 77 4/28/2024
2.1.331 73 4/28/2024
2.1.330 75 4/28/2024
2.1.329 81 4/28/2024
2.1.328 78 4/28/2024
2.1.327 88 4/28/2024
2.1.326 72 4/28/2024
2.1.325 72 4/28/2024
2.1.324 74 4/28/2024
2.1.323 83 4/28/2024
2.1.322 78 4/28/2024
2.1.321 74 4/28/2024
2.1.320 86 4/28/2024
2.1.319 82 4/28/2024
2.1.318 76 4/28/2024
2.1.317 73 4/28/2024
2.1.316 71 4/28/2024
2.1.315 79 4/28/2024
2.1.314 86 4/28/2024
2.1.313 73 4/28/2024
2.1.312 83 4/28/2024
2.1.311 84 4/28/2024
2.1.310 87 4/28/2024
2.1.309 75 4/28/2024
2.1.308 81 4/28/2024
2.1.307 81 4/27/2024
2.1.306 71 4/27/2024
2.1.305 75 4/27/2024
2.1.304 86 4/27/2024
2.1.303 83 4/22/2024
2.1.302 92 4/20/2024
2.1.301 83 4/20/2024
2.1.300 79 4/20/2024
2.1.299 82 4/20/2024
2.1.298 75 4/20/2024
2.1.297 79 4/20/2024
2.1.296 73 4/20/2024
2.1.295 77 4/20/2024
2.1.294 76 4/20/2024
2.1.293 80 4/19/2024
2.1.292 75 4/19/2024
2.1.291 77 4/19/2024
2.1.290 71 4/19/2024
2.1.289 75 4/19/2024
2.1.288 70 4/19/2024
2.1.287 66 4/19/2024
2.1.286 76 4/19/2024
2.1.285 72 4/19/2024
2.1.284 80 4/19/2024
2.1.283 73 4/19/2024
2.1.282 71 4/19/2024
2.1.281 78 4/19/2024
2.1.280 74 4/19/2024
2.1.279 77 4/19/2024
2.1.278 75 4/19/2024
2.1.277 70 4/19/2024
2.1.276 74 4/19/2024
2.1.275 78 4/18/2024
2.1.274 66 4/18/2024
2.1.273 106 4/15/2024
2.1.272 87 4/13/2024
2.1.271 77 4/13/2024
2.1.270 75 4/13/2024
2.1.269 66 4/13/2024
2.1.268 69 4/13/2024
2.1.267 71 4/13/2024
2.1.266 78 4/13/2024
2.1.265 76 4/13/2024
2.1.264 70 4/13/2024
2.1.263 75 4/13/2024
2.1.262 74 4/13/2024
2.1.261 76 4/13/2024
2.1.260 70 4/13/2024
2.1.259 70 4/13/2024
2.1.258 75 4/12/2024
2.1.257 57 4/12/2024
2.1.256 67 4/12/2024
2.1.255 72 4/12/2024
2.1.254 69 4/12/2024
2.1.253 66 4/12/2024
2.1.252 71 4/12/2024
2.1.251 68 4/12/2024
2.1.250 63 4/12/2024
2.1.249 75 4/12/2024
2.1.248 63 4/12/2024
2.1.247 67 4/12/2024
2.1.246 64 4/12/2024
2.1.245 73 4/12/2024
2.1.244 71 4/12/2024
2.1.243 75 4/12/2024
2.1.242 75 4/12/2024
2.1.241 72 4/12/2024
2.1.240 74 4/12/2024
2.1.239 81 4/12/2024
2.1.238 74 4/12/2024
2.1.237 75 4/12/2024
2.1.236 77 4/12/2024
2.1.235 78 4/12/2024
2.1.234 75 4/12/2024
2.1.233 69 4/12/2024
2.1.232 77 4/12/2024
2.1.231 80 4/11/2024
2.1.230 74 4/11/2024
2.1.229 77 4/10/2024
2.1.228 76 4/10/2024
2.1.227 71 4/10/2024
2.1.226 72 4/10/2024
2.1.225 69 4/10/2024
2.1.224 66 4/10/2024
2.1.223 71 4/10/2024
2.1.222 57 4/10/2024
2.1.221 59 4/10/2024
2.1.220 66 4/10/2024
2.1.219 72 4/10/2024
2.1.218 65 4/10/2024
2.1.217 71 4/10/2024
2.1.216 67 4/10/2024
2.1.215 65 4/10/2024
2.1.214 68 4/10/2024
2.1.213 80 4/9/2024
2.1.212 76 4/9/2024
2.1.211 79 4/9/2024
2.1.210 74 4/9/2024
2.1.209 90 4/8/2024
2.1.208 121 4/5/2024
2.1.207 71 4/4/2024
2.1.206 84 4/4/2024
2.1.205 76 4/4/2024
2.1.204 96 4/3/2024
2.1.203 82 4/3/2024
2.1.202 77 4/3/2024
2.1.201 75 4/3/2024
2.1.200 81 4/2/2024
2.1.199 72 4/2/2024
2.1.198 88 4/2/2024
2.1.197 85 4/2/2024
2.1.196 59 4/2/2024
2.1.195 84 4/2/2024
2.1.194 80 4/2/2024
2.1.193 87 4/2/2024
2.1.192 77 4/2/2024
2.1.191 64 4/2/2024
2.1.190 70 4/2/2024
2.1.189 78 4/1/2024
2.1.188 68 4/1/2024
2.1.187 75 4/1/2024
2.1.186 73 4/1/2024
2.1.185 70 4/1/2024
2.1.184 92 3/30/2024
2.1.183 81 3/30/2024
2.1.182 91 3/30/2024
2.1.181 78 3/30/2024
2.1.180 79 3/29/2024
2.1.179 79 3/29/2024
2.1.178 83 3/29/2024
2.1.177 74 3/29/2024
2.1.176 67 3/27/2024
2.1.175 82 3/26/2024
2.1.174 72 3/26/2024
2.1.173 68 3/25/2024
2.1.172 72 3/25/2024
2.1.171 62 3/25/2024
2.1.170 64 3/25/2024
2.1.169 74 3/25/2024
2.1.168 65 3/25/2024
2.1.167 81 3/25/2024
2.1.166 83 3/25/2024
2.1.165 74 3/25/2024
2.1.164 59 3/25/2024
2.1.163 77 3/25/2024
2.1.162 70 3/25/2024
2.1.161 84 3/24/2024
2.1.160 68 3/23/2024
2.1.159 96 3/21/2024
2.1.158 69 3/21/2024
2.1.157 86 3/21/2024
2.1.156 85 3/21/2024
2.1.155 79 3/21/2024
2.1.154 77 3/21/2024
2.1.153 79 3/21/2024
2.1.152 82 3/21/2024
2.1.151 85 3/21/2024
2.1.150 83 3/20/2024
2.1.149 70 3/20/2024
2.1.148 94 3/20/2024
2.1.147 94 3/20/2024
2.1.146 89 3/20/2024
2.1.145 96 3/20/2024
2.1.144 98 3/20/2024
2.1.143 91 3/20/2024
2.1.142 94 3/20/2024
2.1.141 77 3/19/2024
2.1.140 78 3/19/2024
2.1.139 96 3/19/2024
2.1.138 90 3/19/2024
2.1.137 83 3/19/2024
2.1.136 86 3/19/2024
2.1.135 89 3/19/2024
2.1.134 80 3/19/2024
2.1.133 98 3/19/2024
2.1.132 91 3/19/2024
2.1.131 98 3/19/2024
2.1.130 88 3/19/2024
2.1.129 89 3/19/2024
2.1.128 101 3/19/2024
2.1.127 75 3/19/2024
2.1.126 93 3/19/2024
2.1.125 92 3/18/2024
2.1.124 93 3/18/2024
2.1.123 82 3/18/2024
2.1.122 123 3/18/2024
2.1.121 100 3/16/2024
2.1.120 88 3/16/2024
2.1.119 100 3/16/2024
2.1.118 97 3/16/2024
2.1.117 92 3/16/2024
2.1.116 98 3/16/2024
2.1.115 97 3/16/2024
2.1.114 89 3/16/2024
2.1.113 93 3/16/2024
2.1.112 82 3/15/2024
2.1.111 83 3/15/2024
2.1.110 101 3/15/2024
2.1.109 91 3/15/2024
2.1.108 95 3/14/2024
2.1.107 95 3/14/2024
2.1.106 96 3/14/2024
2.1.105 69 3/14/2024
2.1.104 91 3/14/2024
2.1.103 106 3/13/2024
2.1.102 97 3/13/2024
2.1.101 95 3/13/2024
2.1.100 91 3/13/2024
2.1.99 93 3/13/2024
2.1.98 98 3/13/2024
2.1.97 95 3/13/2024
2.1.96 85 3/13/2024
2.1.95 90 3/13/2024
2.1.94 79 3/13/2024
2.1.93 105 3/13/2024
2.1.92 93 3/13/2024
2.1.91 103 3/13/2024
2.1.90 102 3/13/2024
2.1.89 97 3/13/2024
2.1.88 96 3/13/2024
2.1.87 86 3/13/2024
2.1.86 102 3/13/2024
2.1.85 82 3/13/2024
2.1.84 83 3/13/2024
2.1.83 100 3/13/2024
2.1.82 90 3/13/2024
2.1.81 89 3/13/2024
2.1.80 95 3/12/2024
2.1.79 97 3/12/2024
2.1.78 104 3/12/2024
2.1.77 88 3/12/2024
2.1.76 84 3/12/2024
2.1.75 88 3/12/2024
2.1.74 77 3/12/2024
2.1.73 95 3/12/2024
2.1.72 96 3/12/2024
2.1.71 80 3/12/2024
2.1.70 93 3/12/2024
2.1.69 75 3/12/2024
2.1.68 81 3/12/2024
2.1.67 85 3/12/2024
2.1.66 97 3/12/2024
2.1.65 97 3/11/2024
2.1.64 96 3/11/2024
2.1.63 118 3/11/2024
2.1.62 78 3/11/2024
2.1.61 106 3/11/2024
2.1.60 79 3/11/2024
2.1.59 90 3/11/2024
2.1.58 101 3/11/2024
2.1.57 83 3/11/2024
2.1.56 97 3/11/2024
2.1.55 89 3/11/2024
2.1.54 91 3/11/2024
2.1.53 99 3/11/2024
2.1.52 103 3/10/2024
2.1.51 94 3/10/2024
2.1.50 106 3/10/2024
2.1.49 102 3/10/2024
2.1.48 99 3/10/2024
2.1.47 85 3/10/2024
2.1.46 95 3/10/2024
2.1.45 93 3/10/2024
2.1.44 100 3/10/2024
2.1.43 95 3/10/2024
2.1.42 86 3/10/2024
2.1.41 98 3/9/2024
2.1.40 94 3/9/2024
2.1.39 96 3/9/2024
2.1.38 105 3/9/2024
2.1.37 109 3/9/2024
2.1.36 85 3/9/2024
2.1.35 98 3/8/2024
2.1.34 93 3/8/2024
2.1.33 96 3/8/2024
2.1.32 102 3/8/2024
2.1.31 98 3/8/2024
2.1.30 96 3/8/2024
2.1.29 88 3/8/2024
2.1.28 100 3/8/2024
2.1.27 87 3/8/2024
2.1.26 106 3/8/2024
2.1.25 84 3/8/2024
2.1.24 97 3/8/2024
2.1.23 89 3/8/2024
2.1.22 80 3/8/2024
2.1.21 109 3/8/2024
2.1.20 114 3/7/2024
2.1.19 99 3/7/2024
2.1.18 90 3/7/2024
2.1.17 93 3/6/2024
2.1.16 85 3/6/2024
2.1.15 100 3/6/2024
2.1.14 99 3/6/2024
2.1.13 101 3/6/2024
2.1.12 95 3/6/2024
2.1.11 98 3/6/2024
2.1.10 94 3/6/2024
2.1.9 100 3/6/2024
2.1.8 94 3/6/2024
2.1.7 90 3/6/2024
2.1.6 105 3/6/2024
2.1.5 104 3/6/2024
2.1.4 90 3/5/2024
2.1.3 101 3/5/2024