ant-design-blazor/components/input-number/InputNumber.razor
Luke Parker [SSW] 537167b73b feat(module: InputNumber): Add OnFocus event (#1931)
* Add on textbox focus

* Adjust naming

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-09-12 06:05:30 +00:00

19 lines
1.2 KiB
C#

@namespace AntDesign
@typeparam TValue
@inherits AntInputComponentBase<TValue>
<div class="@ClassMapper.Class" style="@Style" id="@Id">
<div class="ant-input-number-handler-wrap">
<span unselectable="unselectable" role="button" aria-label="Increase Value" class="@GetIconClass("up")" @onmousedown="IncreaseDown" @onmouseup="IncreaseUp" @onmouseout="IncreaseUp">
<Icon Class="ant-input-number-handler-up-inner" Type="up" />
</span>
<span unselectable="unselectable" role="button" aria-label="Decrease Value" class="@GetIconClass("down")" @onmousedown="DecreaseDown" @onmouseup="DecreaseUp" @onmouseout="DecreaseUp">
<Icon Class="ant-input-number-handler-down-inner" Type="down" />
</span>
</div>
<div class="ant-input-number-input-wrap">
<input @ref="Ref" role="spinbutton" aria-valuemin="@Min" aria-valuemax="@Max" autocomplete="off" max="@Max" min="@Min" step="@Step" inputmode="@_inputNumberMode"
aria-valuenow="@CurrentValue" class="ant-input-number-input" @bind="@CurrentValueAsString" @oninput="OnInput" @onkeydown="OnKeyDown" @onfocus="@OnFocusAsync" @onblur="@OnBlurAsync" disabled="@Disabled" />
</div>
</div>