I have the next editor with embedded mask component with on input check up for phone format validity:
<SfInPlaceEditor TValue="string" Value="@(ProfileUser.PhoneNumber.MaskedPhoneFromFullNumber(PhoneMask))" CssClass="w-80" EnableEditMode="EnableEditModePhoneNumber"
EmptyText="-" Mode="RenderMode.Inline" Type="Syncfusion.Blazor.InPlaceEditor.InputType.Text" ActionOnBlur="ActionBlur.Cancel">
<InPlaceEditorEvents TValue="string" OnActionBegin="@OnPhoneNumberChanging" />
<EditorComponent>
<SfMaskedTextBox ID="Phone" Placeholder="@(StringLocalizer["Enter the phone number..."])" ShowClearButton="true"
@bind-Value="@ShortPhoneNumber" Mask="@PhoneMask" CssClass="@(PhoneValidationMessage != null ? "e-error" : string.Empty)"
OnInput="@OnPhoneNumberInput" OnBlur="@OnPhoneNumberBlur"
@onkeydown="@(args => { if ((args.Key == "Backspace" || args.Key == "Delete") &&
string.IsNullOrEmpty(ShortPhoneNumber) && PhoneMask != Consts.PhoneMaskBase)
{ PhoneMask = Consts.PhoneMaskBase; MaskChanged = true; }})" />
@if (PhoneValidationMessage != null)
{
<div class="validation-message ">@PhoneValidationMessage</div>
}
</EditorComponent>
</SfInPlaceEditor>
Before todays update everything worked, but after update in-line editor stops editing after each key press (where the format validity should be checked only).
|
<SfInPlaceEditor Type="Syncfusion.Blazor.InPlaceEditor.InputType.Mask">
<EditorComponent>
<SfMaskedTextBox …… <SfMaskedTextBox>
</EditorComponent>
</SfInPlaceEditor> |
I found an answer. An edit mode was bound to variable and was not turned on when the user started to edit.
BeginEdit="@(() => EnableEditModePhoneNumber = true)" solved the troub