private async Task OnBlurAsync(FocusEventArgs e) { if (OnBlur.HasDelegate) { await OnBlur.InvokeAsync(e); } }
internal virtual async Task OnBlurAsync(FocusEventArgs e) { if (OnBlur.HasDelegate) { await OnBlur.InvokeAsync(e); } }
public void HandleBlur(string value) { if (OnBlur.HasDelegate) { OnBlur.InvokeAsync(value); } }
protected void OnBlurEvent(FocusEventArgs?e) { if (ValidateOnBlur && EditContext != null) { EditContext.NotifyFieldChanged(FieldIdentifier); } if (OnBlur.HasDelegate) { OnBlur.InvokeAsync(e); } }
internal virtual async Task OnBlurAsync(FocusEventArgs e) { if (_compositionInputting) { _compositionInputting = false; } await ChangeValue(); if (OnBlur.HasDelegate) { await OnBlur.InvokeAsync(e); } }
internal async void Onblur(FocusEventArgs args) { if (args == null) { return; } Focused = false; if (OnBlur.HasDelegate) { await OnBlur.InvokeAsync(args); } await JsInvokeAsync(JSInteropConstants.blur, Ref); StateHasChanged(); }
internal virtual async Task OnBlurAsync(FocusEventArgs e) { IsFocused = false; if (_hasAffixWrapper) { SetClasses(); } if (_compositionInputting) { _compositionInputting = false; } await ChangeValue(true); if (OnBlur.HasDelegate) { await OnBlur.InvokeAsync(e); } }
protected virtual void OnBlurred(FocusEventArgs obj) { _isFocused = false; Touched = true; BeginValidateAfter(OnBlur.InvokeAsync(obj)); }
protected virtual Task HandleBlur(FocusEventArgs args) { return(OnBlur.InvokeAsync(args)); }
/// <inheritdoc /> protected override void BuildRenderTree(RenderTreeBuilder builder) { // Label BuildRenderTreeLabel(builder); if (HasInputGroup) { // <div> builder.OpenElement(0, Html.DIV); builder.AddAttribute(1, Html.CLASS, Bootstrap.INPUT_GROUP); } if (HasPrepend) { // <div> builder.OpenElement(2, Html.DIV); builder.AddAttribute(3, Html.CLASS, Bootstrap.INPUT_GROUP_PREPEND); // <span> builder.OpenElement(4, Html.SPAN); builder.AddAttribute(5, Html.CLASS, Bootstrap.INPUT_GROUP_TEXT); builder.AddContent(6, Prepend); builder.CloseElement(); // </span> // </div> builder.CloseElement(); } // Input builder.OpenElement(7, Html.INPUT); builder.AddMultipleAttributes(8, Attributes); builder.AddAttribute(9, Html.TYPE, "number"); builder.AddAttribute(10, Html.VALUE, BindConverter.FormatValue(CurrentValueAsString)); builder.AddAttribute(11, Html.CLASS, CssClass); // Overwrite class in Attributes // Data Binding & OnChange builder.AddAttribute(12, Html.ONCHANGE, EventCallback.Factory.CreateBinder <string>(this, async(__value) => { // Bind CurrentValueAsString = __value; // OnChange if (OnChange.HasDelegate) { await OnChange.InvokeAsync(new ChangeEventArgs { Value = __value }); } }, CurrentValueAsString)); // OnBlur if (OnBlur.HasDelegate) { builder.AddAttribute(13, "onblur", EventCallback.Factory.Create(this, async(__value) => { await OnBlur.InvokeAsync(new EventArgs()); })); } // OnFocus if (OnFocus.HasDelegate) { builder.AddAttribute(13, "onfocus", EventCallback.Factory.Create(this, async(__value) => { await OnFocus.InvokeAsync(new EventArgs()); })); } // Disabled? if (Disabled ?? false) { builder.AddAttribute(20, Html.DISABLED, string.Empty); } // Help if (HasHelp) { builder.AddAttribute(21, Html.ARIA_DESCRIBEDBY, $"{Id}-help"); } builder.CloseElement(); if (HasAppend) { // <div> builder.OpenElement(22, Html.DIV); builder.AddAttribute(23, Html.CLASS, "input-group-append"); // <span> builder.OpenElement(24, Html.SPAN); builder.AddAttribute(25, Html.CLASS, Bootstrap.INPUT_GROUP_TEXT); builder.AddContent(26, Append); builder.CloseElement(); // </span> // </div> builder.CloseElement(); } if (HasInputGroup) { // </div> builder.CloseElement(); } // Help BuildRenderTreeHelp(builder); }
private async Task OnOptionBlur(FocusEventArgs focusEventArgs) { await OnBlur.InvokeAsync(new ChoiceGroupOptionFocusEventArgs { Item = Item, FocusEventArgs = focusEventArgs }); }
private void Blur(FocusEventArgs e) { this._isFocused = false; OnBlur.InvokeAsync(e); }