Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ad9a45d

Browse files
Allow to specify type on MatIconButton. Fixes #315
- Material icon button changes - set type in Material autocomplete Thanks!
1 parent ed0c202 commit ad9a45d

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

‎src/MatBlazor/Components/MatAutocomplete/MatAutocomplete.razor‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@if (IsShowingClearButton)
1010
{
1111
<div class="mat-autocomplete-clearbutton">
12-
<MatIconButton Icon="clear" OnMouseDown="@ClearText"></MatIconButton>
12+
<MatIconButton Type="button"Icon="clear" OnMouseDown="@ClearText"></MatIconButton>
1313
</div>
1414
}
1515
@if (Collection != null && IsOpened)

‎src/MatBlazor/Components/MatIconButton/BaseMatIconButton.cs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ protected bool Toggled
4747
}
4848
}
4949

50+
/// <summary>
51+
/// The default behavior of the button. Possible values are:
52+
/// "button", "reset", "submit"
53+
/// </summary>
54+
[Parameter]
55+
public string Type { get; set; }
56+
5057
/// <summary>
5158
/// Navigate to this url when clicked.
5259
/// </summary>

‎src/MatBlazor/Components/MatIconButton/MatIconButton.razor‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@namespace MatBlazor
22
@inherits BaseMatIconButton
33

4-
<button class="@ClassMapper.Class" style="@Style" @ref="Ref" disabled=@Disabled @onclick="OnClickHandler" @onmousedown="OnMouseDown" href=@Link @attributes="Attributes" Id="@Id">
4+
<button class="@ClassMapper.Class" type=@Typestyle="@Style" @ref="Ref" disabled=@Disabled @onclick="OnClickHandler" @onmousedown="OnMouseDown" href=@Link @attributes="Attributes" Id="@Id">
55
@if (Icon != null)
66
{
77
@if (ToggleIcon != null && Toggled)

‎src/MatBlazor/MatBlazor.xml‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /