|
27 | 27 | @if (Strict && !IsValueInList)
|
28 | 28 | {
|
29 | 29 | //Show nothing
|
30 |
| - <MudText Typo="Typo.body1" Class="mud-text-secondary">@Placeholder</MudText> |
| 30 | + <MudText Typo="@Typo" Class="mud-text-secondary">@Placeholder</MudText> |
31 | 31 | }
|
32 | 32 | @if (ValuePresenter == ValuePresenter.Text)
|
33 | 33 | {
|
34 | 34 | if (string.IsNullOrEmpty(Text))
|
35 | 35 | {
|
36 |
| - <MudText Typo="Typo.body1" Class="mud-text-secondary">@Placeholder</MudText> |
| 36 | + <MudText Typo="@Typo" Class="mud-text-secondary">@Placeholder</MudText> |
37 | 37 | }
|
38 | 38 |
|
39 | 39 | <MudRender>@GetSelectTextPresenter()</MudRender>
|
|
42 | 42 | {
|
43 | 43 | if (SelectedValues == null || !SelectedValues.Any())
|
44 | 44 | {
|
45 |
| - <MudText Typo="Typo.body1" Class="mud-text-secondary">@Placeholder</MudText> |
| 45 | + <MudText Typo="@Typo" Class="mud-text-secondary">@Placeholder</MudText> |
46 | 46 | }
|
47 | 47 | <MudChipSet T="T" Class="d-flex flex-wrap mud-width-full" Style="row-gap: 4px" AllClosable="ChipCloseable" OnClose="ChipClosed">
|
48 | 48 | @if (ItemCollection != null)
|
|
65 | 65 | {
|
66 | 66 | if (SelectedListItem == null)
|
67 | 67 | {
|
68 |
| - <MudText Typo="Typo.body1" Class="mud-text-secondary">@Placeholder</MudText> |
| 68 | + <MudText Typo="@Typo" Class="mud-text-secondary">@Placeholder</MudText> |
69 | 69 |
|
70 | 70 | }
|
71 | 71 | else if (ItemTemplate != null)
|
|
76 | 76 | }
|
77 | 77 | else if (!string.IsNullOrEmpty(Placeholder))
|
78 | 78 | {
|
79 |
| - <MudText Typo="Typo.body1" Class="mud-text-secondary">@Placeholder</MudText> |
| 79 | + <MudText Typo="@Typo" Class="mud-text-secondary">@Placeholder</MudText> |
80 | 80 | }
|
81 | 81 | }
|
82 | 82 | else if (SelectedListItem.ChildContent != null)
|
|
87 | 87 | {
|
88 | 88 | @if (string.IsNullOrEmpty(Text))
|
89 | 89 | {
|
90 |
| - <MudText Typo="Typo.body1" Class="mud-text-secondary">@Placeholder</MudText> |
| 90 | + <MudText Typo="@Typo" Class="mud-text-secondary">@Placeholder</MudText> |
91 | 91 | }
|
92 | 92 |
|
93 | 93 | <MudRender>@GetSelectTextPresenter()</MudRender>
|
|
108 | 108 | @StaticContent(this)
|
109 | 109 | }
|
110 | 110 |
|
111 |
| - <CascadingValue Value="@this" IsFixed="true"> |
112 |
| - <MudListExtended @ref="@_list" T="T" @bind-SelectedValue="@Value" Style="@($"overflow-y:auto; max-height: {MaxHeight}px")" @bind-SelectedValues="@SelectedValues" @bind-SelectedItem="@SelectedListItem" @bind-SelectedItems="@SelectedListItems" |
113 |
| - Clickable="true" Color="@Color" Dense="@Dense" ItemCollection="@ItemCollection" Virtualize="@Virtualize" Padding="@EnablePopoverPadding" EnableSelectedItemStyle="@EnableSelectedItemStyle" |
114 |
| - MultiSelection="@MultiSelection" MultiSelectionComponent="@MultiSelectionComponent" MultiSelectionAlign="@MultiSelectionAlign" SelectAll="@SelectAll" SelectAllPosition="@SelectAllPosition" SelectAllText="@SelectAllText" |
115 |
| - CheckedIcon="@CheckedIcon" UncheckedIcon="@UncheckedIcon" IndeterminateIcon="@IndeterminateIcon" SelectValueOnTab="@SelectValueOnTab" Comparer="@Comparer" |
116 |
| - ItemTemplate="@ItemTemplate" ItemSelectedTemplate="@ItemSelectedTemplate" ItemDisabledTemplate="@ItemDisabledTemplate" SearchBox="@SearchBox" SearchBoxAutoFocus="@SearchBoxAutoFocus" SearchFunc="@SearchFunc" SearchBoxPlaceholder="@SearchBoxPlaceholder" |
117 |
| - SearchBoxClearable="@SearchBoxClearable" SearchBoxVariant="@SearchBoxVariant" SearchBoxAdornment="SearchBoxAdornment" ToStringFunc="@ToStringFunc" OnSearchStringChange="@OnSearchStringChange"> |
118 |
| - @ChildContent |
119 |
| - </MudListExtended> |
120 |
| - </CascadingValue> |
| 111 | + @if (ItemCollection != null || ChildContent != null) |
| 112 | + { |
| 113 | + <CascadingValue Value="@this" IsFixed="true"> |
| 114 | + <MudListExtended @ref="@_list" T="T" @bind-SelectedValue="@Value" Style="@($"overflow-y:auto; max-height: {MaxHeight}px")" @bind-SelectedValues="@SelectedValues" @bind-SelectedItem="@SelectedListItem" @bind-SelectedItems="@SelectedListItems" |
| 115 | + Clickable="true" Color="@Color" Dense="@Dense" ItemCollection="@ItemCollection" Virtualize="@Virtualize" Padding="@EnablePopoverPadding" EnableSelectedItemStyle="@EnableSelectedItemStyle" |
| 116 | + MultiSelection="@MultiSelection" MultiSelectionComponent="@MultiSelectionComponent" MultiSelectionAlign="@MultiSelectionAlign" SelectAll="@SelectAll" SelectAllPosition="@SelectAllPosition" SelectAllText="@SelectAllText" |
| 117 | + CheckedIcon="@CheckedIcon" UncheckedIcon="@UncheckedIcon" IndeterminateIcon="@IndeterminateIcon" SelectValueOnTab="@SelectValueOnTab" Comparer="@Comparer" |
| 118 | + ItemTemplate="@ItemTemplate" ItemSelectedTemplate="@ItemSelectedTemplate" ItemDisabledTemplate="@ItemDisabledTemplate" SearchBox="@SearchBox" SearchBoxAutoFocus="@SearchBoxAutoFocus" SearchFunc="@SearchFunc" SearchBoxPlaceholder="@SearchBoxPlaceholder" |
| 119 | + SearchBoxClearable="@SearchBoxClearable" SearchBoxVariant="@SearchBoxVariant" SearchBoxAdornment="SearchBoxAdornment" ToStringFunc="@ToStringFunc" OnSearchStringChange="@OnSearchStringChange"> |
| 120 | + @ChildContent |
| 121 | + </MudListExtended> |
| 122 | + </CascadingValue> |
| 123 | + } |
| 124 | + |
121 | 125 |
|
122 | 126 | @if (StaticContent != null && ShowStaticContentAtEnd)
|
123 | 127 | {
|
|
0 commit comments