knockout.js - Disable select list with knockout -


i'm trying disable select list using knockout disable binding. doesn't work. list still enabled when value (readonly.isnew) true. i've checked value correct i.e. readonly.isnew. works fine checkbox, not select list.

<select name="mydropdown" data-bind="                     options: $parents[1].readonly.mylist,                     value: selectedmethod,                     disable: !(readonly.isnew)"></select> 

i guess isnew observable, in case need unwarp when used in expressions:

disable: !(readonly.isnew()) 

if put observable data-bind knockout automatically unwrap it, example write , work:

disable: readonly.isnew 

however when use expression in data-bind knockout cannot unwrap observable , should yourself. example if want hide select when there no records should write following:

visible : $parents[1].readonly.mylist().length > 0 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -