Skip to content

understand the onchange listener to trigger the setter on javascript #13732

@julienGrd

Description

@julienGrd

Hi guys, i need some explanation about how blazor listen the value change to then execute binding

This question is related to another issue i open #13645, mark as closed but definitively not solved (see my last comment)

im facing this same kind of issue with another library, medium editor : https://github.com/yabwe/medium-editor

i will not put all the detail beacause its not important, but i'm unable to trigger the setter of the property bind on a textarea

for example :

<textarea class="editable" id="txtTextePublic" maxlength="3000" rows="8" @bind="Model.EnfNote.TextePublic" />

in js, if i'm doing something like that, it's not work, the setter of my property in c# is never called

$("#txtTextePublic").val("test").trigger("onchange");
or
$("#txtTextePublic").val("test").trigger("change");

so, what i have missed ?

thanks for your help !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions