Soenneker.Blazor.TomSelect 2.1.273

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.273
NuGet\Install-Package Soenneker.Blazor.TomSelect -Version 2.1.273
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.273" />
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.273
#r "nuget: Soenneker.Blazor.TomSelect, 2.1.273"
#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.273

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

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