File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ var client = function(sitekey) {
7171 throw "Illegal autocomplete parameters. Should be (field, prefix, callbackFunction)" ;
7272 }
7373 this . settings . setAutocompleteParams ( field , prefix ) ;
74- console . log ( 'autocomplete..' ) ;
7574 executeApiFetch ( this . sitekey , 'autocomplete' , this . settings . getSettings ( ) , callback ) ;
7675 }
7776
@@ -92,6 +91,7 @@ var client = function(sitekey) {
9291 this . nextPage = function ( ) { this . settings . nextPage ( ) ; }
9392 this . previousPage = function ( ) { this . settings . previousPage ( ) ; }
9493 this . setSuggestionsSize = function ( size ) { this . settings . setSuggestionsSize ( size ) ; }
94+ this . setAutocompleteSize = function ( size ) { this . settings . setAutocompleteSize ( size ) ; }
9595 this . addFacetField = function ( fieldName ) { this . settings . addFacetField ( fieldName ) ; }
9696 this . setNumberOfFacets = function ( numFacets ) { this . settings . setNumberOfFacets ( numFacets ) ; }
9797 this . setResultType = function ( type ) { this . settings . setResultType ( type ) ; }
Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ var settings = function() {
1414 customFieldFilters : [ ] ,
1515 userToken : null ,
1616 suggestionsSize : 10 ,
17- facetFields : [ ]
17+ facetFields : [ ] ,
18+ autocomplete : {
19+ size : 10
20+ }
1821 } ;
1922
2023 this . getSettings = function ( ) {
@@ -37,11 +40,13 @@ var settings = function() {
3740 this . settings . suggestionsSize = size ;
3841 }
3942
43+ this . setAutocompleteSize = function ( size ) {
44+ this . settings . autocomplete . size = size ;
45+ }
46+
4047 this . setAutocompleteParams = function ( field , prefix ) {
41- this . settings . autocomplete = {
42- field : field ,
43- prefix : prefix
44- } ;
48+ this . settings . autocomplete . field = field ;
49+ this . settings . autocomplete . prefix = prefix ;
4550 }
4651
4752 this . setLanguage = function ( language ) {
You can’t perform that action at this time.
0 commit comments