We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Multiline does not fire onchange native event.

Thread ID:

Created:

Updated:

Platform:

Replies:

148094 Oct 4,2019 08:51 PM UTC Oct 7,2019 11:15 AM UTC Blazor 1
loading
Tags: TextBox
Michael
Asked On October 4, 2019 08:51 PM UTC

In the below code, the @onchange is not fired for a TextBox with the Multiline property set.

--

@page "/TextBoxMultiline"
@using Syncfusion.EJ2.Blazor
@using Syncfusion.EJ2.Blazor.Inputs

<div>
    <dl class="row">
        <dt class="col-sm-3 control-label">First Name</dt>
        <dd class="col-sm-9">
            <EjsTextBox Value="@Singleline"
                        @onchange="@((Microsoft.AspNetCore.Components.ChangeEventArgs args) => { Singleline = (string)args.Value; StateHasChanged(); } )">
            </EjsTextBox>
            <EjsTextBox Value="@Multiline"
                        Multiline="true"
                        @onchange="@((Microsoft.AspNetCore.Components.ChangeEventArgs args) => { Multiline = (string)args.Value; StateHasChanged(); } )">
            </EjsTextBox>
        </dd>
    </dl>
    <hr />
    <div>
        <h5>Values</h5>
        Single: @Singleline<br />
        Multi: @Multiline<br />
    </div>
</div>

@code {
    [Parameter()]
    public string Singleline { get; set; } = "";

    [Parameter()]
    public string Multiline { get; set; } = "";

    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();

        Singleline = "This is a single line value.";
        Multiline = "This is a multiline value.\r\nThis is a second line.";
    }
}


Sureshkumar P [Syncfusion]
Replied On October 7, 2019 11:15 AM UTC

Hi Michael, 

Greetings from Syncfusion support, 

We have validated your reported issue and this is known issue in our end. We have logged bug report for it and this fix will be available on mid of October 2019. You can track the status of this bug in the below feedback link.   
  

To meet your requirements, we suggest using our inbuild ValueChange event to access the multi-line textbox component change event features. The code block and sample can be found here. 

[index.razor] 

<EjsTextBox Value="@Multiline" 
                        Multiline="true" 
                        ValueChange="@multiLineChange"> 
            </EjsTextBox> 
@code { 
 
    [Parameter()] 
    public string Multiline { get; set; } = ""; 
 
    protected override async Task OnInitializedAsync() 
    { 
        await base.OnInitializedAsync(); 
        Multiline = "This is a multiline value.\r\nThis is a second line."; 
    } 
 
    void multiLineChange(Syncfusion.EJ2.Blazor.Inputs.ChangedEventArgs args) 
    { 
        this.Multiline = args.Value;  
        StateHasChanged(); 
    } 
} 


Regards, 
Sureshkumar P 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon