Open hoangnm89 opened 9 years ago
Call onData instead. Replace return onData;
with onData([{ name: /* … */ }]);
.
thanks for reply, but i still dont understand what you say: onData([{ name: /* … */ }]); write for me little bit of code to show how it work. thank you so much
i dont know how to use dataMethod. i setup like this: $(function() { $('#friend_id2').awesomecomplete({ //more config dataMethod: dataMethod }); }); var dataMethod = function(term, $awesomecomplete, onData) { onData = [ { name: 'Ryan Lapin', email: 'ryan.lapin@albany.dundermifflin.com', phone: '(512) 829-4442' }, { name: 'Angela Kapoor', email: 'angela.kapoor@yonkers.dundermifflin.com', phone: '(435) 149-4341' }, { name: 'Pam Martin', email: 'pam.martin@buffalo.dundermifflin.com', phone: '(204) 189-7995' } ]; return onData; };
it didn't work for me. I want to call ajax and get data from server