Skip to content

@bind="" and @oninput="" issue Blazor #17702

@faisal5170

Description

@faisal5170

below is my HTML content

<input type="text" id="txtSearch" placeholder="Search Titles..." class="form-control" @Bind="searchTerm" @oninput="@FilterRecords" />

@code {
private string searchTerm;

public async Task FilterRecords(EventArgs args)
{
//code
}

but when I press key searchTerm property get previous values like If I press "a" it will take null, if I press "ab" it will take "a", press "abc" will take "ab" etc..
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions