Skip to content

Blazor fire onchange event when Chosen drop down value changes #16942

@abdulqayyum

Description

@abdulqayyum

I have following html in razor component that works but when I render drop down with Chosen it stops working. because chosen do not update actual drop down value it creates its own element that holds selected value. but i can not access that so how to trigger the onchange event then?

<select id="search" single class="chosen-select" @onchange="UpdateValue" bind="@searchValue">
        ...
</select>
...In @Code
void UpdateValue(ChangeEventArgs e)
{
    searchValue = e.Value.ToString();
    ... 
}

Now if I initialize drop down with chosen then I can not detect on change but can other wise. I am using Blazor GL - Server Side with .net core 3.0.1

I do not know what is the fast method reporting here or asking stackoverflow so I did asked here too
https://stackoverflow.com/questions/58777642/blazor-fire-onchange-event-when-chosen-drop-down-value-changes

Metadata

Metadata

Assignees

Labels

Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-blazorIncludes: Blazor, Razor Componentsinvestigate

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions