rniemeyer / knockout-jqAutocomplete

knockout-jqAutocomplete is a Knockout.js plugin designed to work with jQuery UI's autocomplete widget.
MIT License
49 stars 20 forks source link

Update autocomplete with label option #15

Open DenEddie opened 9 years ago

DenEddie commented 9 years ago

The label option makes it possible to update an extra observable in your viewmodel. This allows flattened viewmodels to update key and label of a referenced object.

e.g. I had a viewmodel with personId and personName and wanted both to update in the viewmodel. passing personId as value and personName as label solved this issue.