samedi 30 juillet 2016

Can't override _renderItem function in jQuery UI autocomplete

I'm trying to display images with labels in jQuery UI Autocomplete. I got stuck at the error "jquery-ui.js:6853 Uncaught TypeError: Cannot read property 'value' of undefined". However, during my investigation, it turned out that the problem is in overriding _renderItem function - whatever I do in its overriden implementation I see the same error, even if I define it by just copying code from jQuery UI source code. I tried jQuery UI versions 1.10.4 1.11.4 and 1.10.2 and problem still exists. I think that I've already tried almost everything, even making really silly versions of autocomplete, but still every time I do something with _renderItem implementation, the error occurs.

According to source code of jQuery UI, the reason of this error is lack of 'ui-autocomplete-item' data, but I do send it, so I've got no idea what I'm doing wrong.

Aucun commentaire:

Enregistrer un commentaire