Skip to content

Commit

Permalink
Adds Floating label type to MultiSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
mmonteagudo committed Oct 5, 2024
1 parent ad79ee8 commit b160a7a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Havit.Blazor.Components.Web.Bootstrap/Forms/HxMultiSelect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Havit.Blazor.Components.Web.Bootstrap;
/// </summary>
/// <typeparam name="TValue">Type of values.</typeparam>
/// <typeparam name="TItem">Type of items.</typeparam>
public class HxMultiSelect<TValue, TItem> : HxInputBase<List<TValue>>, IInputWithSize
public class HxMultiSelect<TValue, TItem> : HxInputBase<List<TValue>>, IInputWithSize, IInputWithLabelType
{
/// <summary>
/// Return <see cref="HxMultiSelect{TValue, TItem}"/> defaults.
Expand Down Expand Up @@ -161,6 +161,11 @@ public class HxMultiSelect<TValue, TItem> : HxInputBase<List<TValue>>, IInputWit
[Parameter] public IconBase FilterClearIcon { get; set; }
protected IconBase FilterClearIconEffective => FilterClearIcon ?? GetSettings()?.FilterClearIcon ?? GetDefaults().FilterClearIcon;

/// <inheritdoc cref="Bootstrap.LabelType" />
[Parameter] public LabelType? LabelType { get; set; }
protected LabelType LabelTypeEffective => LabelType ?? GetSettings()?.LabelType ?? GetDefaults()?.LabelType ?? HxSetup.Defaults.LabelType;
LabelType IInputWithLabelType.LabelTypeEffective => LabelTypeEffective;

private List<TItem> _itemsToRender;
private HxMultiSelectInternal<TValue, TItem> _hxMultiSelectInternalComponent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ public record MultiSelectSettings : InputSettings
/// </summary>
public InputSize? InputSize { get; set; }

/// <summary>
/// The label type.
/// </summary>
public LabelType? LabelType { get; set; }

/// <summary>
/// Enables filtering capabilities.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4681,6 +4681,9 @@
Icon displayed in filter input for clearing the filter.
</summary>
</member>
<member name="P:Havit.Blazor.Components.Web.Bootstrap.HxMultiSelect`2.LabelType">
<inheritdoc cref="T:Havit.Blazor.Components.Web.Bootstrap.LabelType" />
</member>
<member name="M:Havit.Blazor.Components.Web.Bootstrap.HxMultiSelect`2.FocusAsync">
<inheritdoc cref="M:Havit.Blazor.Components.Web.Bootstrap.HxInputBase`1.FocusAsync"/>
</member>
Expand Down Expand Up @@ -5395,6 +5398,11 @@
Input size.
</summary>
</member>
<member name="P:Havit.Blazor.Components.Web.Bootstrap.MultiSelectSettings.LabelType">
<summary>
The label type.
</summary>
</member>
<member name="P:Havit.Blazor.Components.Web.Bootstrap.MultiSelectSettings.AllowFiltering">
<summary>
Enables filtering capabilities.
Expand Down

0 comments on commit b160a7a

Please sign in to comment.