value-bingding on <select> can't work with computed

26 views
Skip to first unread message

super...@163.com

unread,
Apr 12, 2017, 9:24:20 AM4/12/17
to KnockoutJS
i found that a computed observable will run twice when it based on a obsevable binding to a <select>.
I tried to make it bind to a <input> then it works correctly.
I don't know the reason.Please help me.

Gunnar Liljas

unread,
Apr 12, 2017, 9:52:58 AM4/12/17
to knock...@googlegroups.com
A writable computed, that is?

--
You received this message because you are subscribed to the Google Groups "KnockoutJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knockoutjs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Best

unread,
Apr 12, 2017, 3:47:40 PM4/12/17
to KnockoutJS
Try adding the valueAllowUnset: true binding to the select.
Reply all
Reply to author
Forward
0 new messages