File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -123,13 +123,15 @@ $('#autocomplete').autocomplete({
123123 lookup : function (query , done ) {
124124 // Do ajax call or lookup locally, when done,
125125 // call the callback and pass your results:
126- var results = [
127- { " value" : " United Arab Emirates" , " data" : " AE" },
128- { " value" : " United Kingdom" , " data" : " UK" },
129- { " value" : " United States" , " data" : " US" }
130- ];
126+ var result = {
127+ suggestions: [
128+ { " value" : " United Arab Emirates" , " data" : " AE" },
129+ { " value" : " United Kingdom" , " data" : " UK" },
130+ { " value" : " United States" , " data" : " US" }
131+ ]
132+ };
131133
132- done (results );
134+ done (result );
133135 },
134136 onSelect : function (suggestion ) {
135137 alert (' You selected: ' + suggestion .value + ' , ' + suggestion .data );
You can’t perform that action at this time.
0 commit comments