knockout js radio button click event reset selection

后端 未结 3 1085
无人共我
无人共我 2021-02-13 02:46

I have bind \"checked\" and \"click\" event on a radio button list. But whenever a radio button is clicked, the selection does not stay. I must be doing something really wrong.

3条回答
  •  悲哀的现实
    2021-02-13 03:13

    Basically, your click handler won't end up catching that you want to retain the value.

    What is happening is that it is going back to default after you select an item.

    Simply try:

    return true;

    As the only code in your handler.

    Fiddle away: http://jsfiddle.net/SinisterSystems/jhHkD/4/

提交回复
热议问题