Open vanderlee opened 7 years ago
@vanderlee - If you know the label/value already, then you could set it directly:
this.remoteValue = ko.observable( { test: "initial-value", val: 3 } );
in the sample.
However, this would have to be the actual value
until someone changed it. So, if a user did not make a change, then you would have to have code that checked if the value was an object rather than a number and grabbed the val
(in this case).
I could see a change to this lib to look at an object provided in the dataValue
option to try to determine the initial label value.
I have this same issue. I think a change to the lib would be useful
When using a remote source, the initial value does not display the labelProp value.
For example, this slightly modified demo with initial value
3
for theremoteHandler
: http://jsfiddle.net/bvphzjvc/Is it possible to call the source with the full value or perhaps some other method/trick to set the initial label?