Update typeahead-tests.ts

This commit is contained in:
maanasa
2014-03-27 13:25:36 +08:00
committed by Troy Gerwien
parent 08e8430ce5
commit 63199e8ecc
+13
View File
@@ -71,3 +71,16 @@ $('.example-films .typeahead').typeahead([
engine: Hogan
}
]);
//Basic substring search
//Specifies options along with datasets. In this case the dataset uses a custom substring matcher function as its source
$('#the-basics .typeahead').typeahead({
hint: true,
highlight: true,
minLength: 1
},
{
name: 'states',
displayKey: 'value',
source: substringMatcher(states)
});