mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Update typeahead-tests.ts
Adding tests for including options
This commit is contained in:
@@ -72,15 +72,16 @@ $('.example-films .typeahead').typeahead([
|
||||
}
|
||||
]);
|
||||
|
||||
//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({
|
||||
// Countries - Modified the first test here to add options
|
||||
// Specifies options to display hint with a highlight and adds a minimum length restriction for search
|
||||
// Prefetches data, stores it in localStorage, and searches it on the client
|
||||
$('.example-countries .typeahead').typeahead({
|
||||
hint: true,
|
||||
highlight: true,
|
||||
minLength: 1
|
||||
minLength: 2
|
||||
},
|
||||
{
|
||||
name: 'states',
|
||||
displayKey: 'value',
|
||||
source: substringMatcher(states)
|
||||
name: 'countries',
|
||||
prefetch: '../data/countries.json',
|
||||
limit: 10
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user