Skip to content

Autocomplete documentation wrong #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cguilhermef opened this issue Jan 15, 2015 · 5 comments
Closed

Autocomplete documentation wrong #244

cguilhermef opened this issue Jan 15, 2015 · 5 comments

Comments

@cguilhermef
Copy link

About source function, was described the "function" parameter :

A request object, with a single term property, which refers to the value currently in the text input. For example, if the user enters "new yo" in a city field, the Autocomplete term will equal "new yo".

but this property doesn't exist anymore. The request object is the term typed by user.

The same to "select" event:

select:function(event,ui){} where ui parameter comes undefined. And, "event" becomes "ui" without the "item" property - just ui.value and ui.label - no anymore ui.item.label ui.item.value

@scottgonzalez
Copy link
Member

It sounds to me like you're not using jQuery UI.

@cguilhermef
Copy link
Author

I'm sure that I'm using jQuery UI Autocomplete plugin and documentation is wrong or not updated.

http://api.jqueryui.com/autocomplete/#option-source

@scottgonzalez
Copy link
Member

I highly doubt that, but you can prove it with a reduced test case.

@cguilhermef
Copy link
Author

autocomplete({
source: function(request, response) {
//request.term return undfined. but just "request" return the typed terms
},
select:function(event, ui){
// ui is undefined
// event doesn't is an Event but an Object - old ui.item
}
});

@scottgonzalez
Copy link
Member

That's not really helpful. But to prove my point: http://jsbin.com/nesumujisa/1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants