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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions CodeBeam.MudBlazor.Extensions/Base/MudBaseInputExtended.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ protected MudBaseInputExtended() : base(new DefaultConverter<T>()) { }
/// </summary>
[Parameter]
[Category(CategoryTypes.FormComponent.Behavior)]
public bool ShrinkLabel { get; set; }
public bool ShrinkLabel { get; set; } = MudGlobal.InputDefaults.ShrinkLabel;

/// <summary>
/// The color of the adornment if used. It supports the theme colors.
Expand All @@ -182,14 +182,14 @@ protected MudBaseInputExtended() : base(new DefaultConverter<T>()) { }
/// </summary>
[Parameter]
[Category(CategoryTypes.FormComponent.Appearance)]
public Variant Variant { get; set; } = Variant.Text;
public Variant Variant { get; set; } = MudGlobal.InputDefaults.Variant;

/// <summary>
/// Will adjust vertical spacing.
/// </summary>
[Parameter]
[Category(CategoryTypes.FormComponent.Appearance)]
public Margin Margin { get; set; } = Margin.None;
public Margin Margin { get; set; } = MudGlobal.InputDefaults.Margin;

/// <summary>
/// The short hint displayed in the input before the user enters a value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
{
<MudText Typo="@Typo" Class="mud-text-secondary mud-placeholder-extended">@Placeholder</MudText>
}
<MudChipSet T="T" Class="d-flex flex-wrap mud-width-full" Style="row-gap: 4px" AllClosable="ChipCloseable" OnClose="ChipClosed">
<MudChipSet T="T" Class="@InputChipClassname" AllClosable="ChipCloseable" OnClose="ChipClosed">
@if (ItemCollection != null)
{
foreach (var item in ItemCollection.Where(x => SelectedValues?.Contains(x) == true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
/// <summary>
///
/// </summary>
protected Dictionary<T, MudSelectItemExtended<T?>> _valueLookup = new();

Check warning on line 45 in CodeBeam.MudBlazor.Extensions/Components/SelectExtended/MudSelectExtended.razor.cs

View workflow job for this annotation

GitHub Actions / build

The type 'T' cannot be used as type parameter 'TKey' in the generic type or method 'Dictionary<TKey, TValue>'. Nullability of type argument 'T' doesn't match 'notnull' constraint.
/// <summary>
///
/// </summary>
protected Dictionary<T, MudSelectItemExtended<T?>> _shadowLookup = new();

Check warning on line 49 in CodeBeam.MudBlazor.Extensions/Components/SelectExtended/MudSelectExtended.razor.cs

View workflow job for this annotation

GitHub Actions / build

The type 'T' cannot be used as type parameter 'TKey' in the generic type or method 'Dictionary<TKey, TValue>'. Nullability of type argument 'T' doesn't match 'notnull' constraint.
private MudInputExtended<string> _elementReference = new();
internal bool _isOpen;
/// <summary>
Expand All @@ -72,6 +72,14 @@
.AddClass(InputClass)
.Build();

/// <summary>
///
/// </summary>
protected string? InputChipClassname =>
new CssBuilder("mud-select-input-chip-extended")
.AddClass("mud-select-extended-nowrap mud-chip-scroll-container", NoWrap)
.Build();

private string _elementId = "select_" + Guid.NewGuid().ToString().Substring(0, 8);
private string _popoverId = "selectpopover_" + Guid.NewGuid().ToString().Substring(0, 8);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,20 @@
border-bottom: 1px solid lightgrey;
padding-bottom: 18px;
}

.mud-select-input-chip-extended {
display: flex;
flex-wrap: wrap;
max-width: 100%;
row-gap: 4px;

&.mud-select-extended-nowrap {
flex-wrap: nowrap;
overflow-x: hidden;
}

.mud-chip {
flex: 0 0 auto;
white-space: nowrap;
}
}
12 changes: 12 additions & 0 deletions CodeBeam.MudBlazor.Extensions/Styles/MudExtensions.css
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,18 @@
border-bottom: 1px solid lightgrey;
padding-bottom: 18px; }

.mud-select-input-chip-extended {
display: flex;
flex-wrap: wrap;
max-width: 100%;
row-gap: 4px; }
.mud-select-input-chip-extended.mud-select-extended-nowrap {
flex-wrap: nowrap;
overflow-x: hidden; }
.mud-select-input-chip-extended .mud-chip {
flex: 0 0 auto;
white-space: nowrap; }

/*@import '../abstracts/variables';*/
.mud-placeholder-extended {
line-height: unset; }
Expand Down
2 changes: 1 addition & 1 deletion CodeBeam.MudBlazor.Extensions/Styles/MudExtensions.min.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading