Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@namespace MudExtensions.UnitTests.TestComponents
<MudPopoverProvider></MudPopoverProvider>

<MudCombobox @bind-Value="value" Clearable="true" OnClearButtonClick="@ClearButtonClickHandler">
<MudComboboxItem Value="@("1")" />
<MudComboboxItem Value="@("2")" />
<MudComboboxItem Value="@("3")" />
</MudCombobox>
<MudComboBox @bind-Value="value" Clearable="true" OnClearButtonClick="@ClearButtonClickHandler">
<MudComboBoxItem Value="@("1")" />
<MudComboBoxItem Value="@("2")" />
<MudComboBoxItem Value="@("3")" />
</MudComboBox>

@code {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@namespace MudExtensions.UnitTests.TestComponents

<MudPopoverProvider></MudPopoverProvider>
<MudCombobox @ref="_combobox" T="string" ValueChanged="ValueChanged" SelectedValuesChanged="ValuesChanged" MultiSelection="MultiSelection">
<MudComboboxItem @ref="FirstItem" T="string" Value="@("1")" />
<MudComboboxItem @ref="SecondItem" T="string" Value="@("2")" />
<MudComboboxItem @ref="ThirdItem" T="string" Value="@("3")" />
<MudComboboxItem T="string" Value="@("4")" Disabled="true" />
</MudCombobox>
<MudComboBox @ref="_combobox" T="string" ValueChanged="ValueChanged" SelectedValuesChanged="ValuesChanged" MultiSelection="MultiSelection">
<MudComboBoxItem @ref="FirstItem" T="string" Value="@("1")" />
<MudComboBoxItem @ref="SecondItem" T="string" Value="@("2")" />
<MudComboBoxItem @ref="ThirdItem" T="string" Value="@("3")" />
<MudComboBoxItem T="string" Value="@("4")" Disabled="true" />
</MudComboBox>

@code {
[Parameter]
Expand All @@ -17,10 +17,10 @@
public int ItemChangeCount { get; set; }
public int ItemsChangeCount { get; set; }

MudCombobox<string> _combobox;
MudComboboxItem<string> FirstItem { get; set; }
MudComboboxItem<string> SecondItem { get; set; }
MudComboboxItem<string> ThirdItem { get; set; }
MudComboBox<string> _combobox;
MudComboBoxItem<string> FirstItem { get; set; }
MudComboBoxItem<string> SecondItem { get; set; }
MudComboBoxItem<string> ThirdItem { get; set; }

//public void SetSelectedItem()
//{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@namespace MudExtensions.UnitTests.TestComponents
<MudPopoverProvider></MudPopoverProvider>

<MudCombobox @bind-Value="SelectedValue" @bind-SelectedValues="SelectedValues" MultiSelection="MultiSelection">
<MudComboboxItem Value="@("1")"/>
<MudComboboxItem Value="@("2")"/>
<MudComboboxItem Value="@("3")"/>
<MudComboboxItem Value="@("4")" Disabled="true"/>
</MudCombobox>
<MudComboBox @bind-Value="SelectedValue" @bind-SelectedValues="SelectedValues" MultiSelection="MultiSelection">
<MudComboBoxItem Value="@("1")"/>
<MudComboBoxItem Value="@("2")"/>
<MudComboBoxItem Value="@("3")"/>
<MudComboBoxItem Value="@("4")" Disabled="true"/>
</MudComboBox>

@code {
[Parameter]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@namespace MudExtensions.UnitTests.TestComponents
<MudPopoverProvider></MudPopoverProvider>

<MudCombobox @bind-SelectedValues="values" MultiSelection="true">
<MudComboboxItem Value="@("1")">1</MudComboboxItem>
<MudComboboxItem Value="@("2")">2</MudComboboxItem>
<MudComboboxItem Value="@("3")">3</MudComboboxItem>
</MudCombobox>
<MudComboBox @bind-SelectedValues="values" MultiSelection="true">
<MudComboBoxItem Value="@("1")">1</MudComboBoxItem>
<MudComboBoxItem Value="@("2")">2</MudComboBoxItem>
<MudComboBoxItem Value="@("3")">3</MudComboBoxItem>
</MudComboBox>


@code {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@namespace MudExtensions.UnitTests.TestComponents
<MudPopoverProvider></MudPopoverProvider>

<MudCombobox Label="Select Item"
<MudComboBox Label="Select Item"
MultiSelection="true"
T="string"
Delimiter="^"
Expand All @@ -10,9 +10,9 @@

@foreach (var item in AllItems)
{
<MudComboboxItem T="string" Value="@item">@item</MudComboboxItem>
<MudComboBoxItem T="string" Value="@item">@item</MudComboBoxItem>
}
</MudCombobox>
</MudComboBox>

@code {
public static string __description__ = "Test for the Select All option";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@namespace MudExtensions.UnitTests.TestComponents
<MudPopoverProvider></MudPopoverProvider>

<MudGrid>
<MudItem xs="12" md="6">
<MudText Typo="Typo.body2">MudSelect.Value: "@value"</MudText>
<MudText Typo="Typo.body2">Selected Values: "@string.Join(", ", options ?? new List<string>())"</MudText>
</MudItem>
<MudItem xs="12" md="12">
<MudComboBox T="string" @bind-Value="value" @bind-SelectedValues="options" Label="Felines" HelperText="Pick your favorite feline"
MultiSelection="true" SelectAll="true" SelectAllText="Select all felines"
MultiSelectionTextFunc="@(new Func<List<string>, string>(GetMultiSelectionText))">
@foreach (var feline in felines)
{
<MudComboBoxItem T="string" Value="@feline">@feline</MudComboBoxItem>
}
</MudComboBox>
</MudItem>
</MudGrid>

@code {
private string value { get; set; } = "Nothing selected";
private IEnumerable<string> options { get; set; } = new HashSet<string>() { "Lion" };

private string[] felines =
{
"Jaguar", "Leopard", "Lion", "Lynx", "Panther", "Puma", "Tiger"
};

private string GetMultiSelectionText(List<string> selectedValues)
{
return $"{selectedValues.Count} feline{(selectedValues.Count > 1 ? "s have" : " has")} been selected";
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@namespace MudExtensions.UnitTests.TestComponents
<MudPopoverProvider></MudPopoverProvider>

<MudCombobox T="string" @bind-Value="value" PopoverClass="combobox-popover-class" @onfocus="Focused" OnBlur="Blurred">
<MudComboboxItem Value="@("1")"/>
<MudComboboxItem Value="@("2")"/>
<MudComboboxItem Value="@("3")"/>
<MudComboboxItem Value="@("4")" Disabled="true"/>
</MudCombobox>
<MudComboBox T="string" @bind-Value="value" PopoverClass="combobox-popover-class" @onfocus="Focused" OnBlur="Blurred">
<MudComboBoxItem Value="@("1")"/>
<MudComboBoxItem Value="@("2")"/>
<MudComboBoxItem Value="@("3")"/>
<MudComboBoxItem Value="@("4")" Disabled="true"/>
</MudComboBox>

<MudSwitch @bind-Checked="@_focused" />

Expand Down
Loading