Knockout checkbox enable dependencies

79 views
Skip to first unread message

ivanov...@gmail.com

unread,
Nov 11, 2012, 5:01:50 PM11/11/12
to knock...@googlegroups.com
I'm trying to make checkbox enabling with dependencies. 
I'd like to enable a checkbox if some of two input fields are not empty. 
and it works perfectly for initializing.. here is printscreen. But it doesn't work with changes, i mean that after you filling any of empty field it doesn't enable.

Here is this question on stackoverflow with code listings.

Denis Kuzin

unread,
Nov 11, 2012, 5:26:18 PM11/11/12
to knock...@googlegroups.com
You must or use computed observable, or subscribe to changes. Your function not notify other model about change.

As I think:
1. You need contact class
2. In class Contact you need computed observable Is_Enabled
3. Get data from server and produce array of Contact elements
3. Do binding
4. Get fun.


2012/11/12 <ivanov...@gmail.com>



--
--
Денис Кузин
dekusworld.ru
Reply all
Reply to author
Forward
0 new messages