TypeError: $(…).autocomplete(…).data(…) is undefined

后端 未结 2 1684
独厮守ぢ
独厮守ぢ 2021-01-21 13:15

I found error when using jQuery autocomplete.

This notice error in console is

TypeError: $(...).autocomplete(...).data(...) is undefined }).dat

2条回答
  •  爱一瞬间的悲伤
    2021-01-21 13:56

    Sorry this fix might be a bit late .. but for the other guys running into this problem.

    just change

    }).data("ui-autocomplete")._renderItem = function (ul, item) {
    

    to

    })._renderItem = function (ul, item) {
    

    This should resolve the issue.

    In some cases it will look like this

    .autocomplete().data("uiAutocomplete")._renderItem =  function( ul, item ) 
    

    Change it to

    .autocomplete()._renderItem = function( ul, item ) 
    

提交回复
热议问题