Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

MudBlazor ChipSet - selecting chips programmatically

$
0
0

I need to implement a "Select all" functionality whereby the user can select all chips via a button click, rather that clicking each item (which can be many!)

<MudButton Variant="Variant.Outlined"            OnClick="(() => AllChips.ToList().ForEach(x => x.IsSelected = true))">    Select all media</MudButton><MudChipSet SelectedChips="@SelectedChips"             MultiSelection="true"             Filter="true">     @foreach (var chip in AllChips)     {<MudChip Text="@chip.Text" />     }</MudChipSet>

I've explored the IsSelected and Default properties of a MudChip to no avail. The tooltip I get is that those properties should not be set outside of their component.

Is this possible to achieve with MudChipSet?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>