function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Winder OjedaWinder Ojeda 

Problem with JQuery UI autocomplete in Lightning Component

Hi, I have the following issue,

I need to use jquery ui autocomplete in a textarea in lightning. In a visualforce page works perfectly, but in a lightning component it does not work, the list of suggestions does not appear.

In the browser console there is no error, and if through a console.log I print what has the source attribute shows me the whole list, ie the list loads well but there is a problem that does not want to show suggestions to the typing time.

jquery ui 1.12.1
jquery 2.2.4

also try with jquery 1.11.4 and it does not work either.

Any ideas?
sfdcMonkey.comsfdcMonkey.com
hi Winder Ojeda, jqueryui 1.12.1 works perfectly with lightning component find out below sample code for jQuery auto complete in lightning component :
 
<aura:component >
  <ltng:require styles="{! $Resource.jQueryuiCSS}" 
      scripts="{!join(',', 
        $Resource.jquery224 ,   
        $Resource.jQueryuiJS)
      }" afterScriptsLoaded="{!c.scriptsLoaded}"/>
	
    <textarea class="slds-input" id="tags"/>
    
</aura:component>
({
	scriptsLoaded : function(component, event, helper) {
	  $(document).ready(function(){ 
           $( function() {
    var availableTags = [
      "ActionScript",
      "AppleScript",
      "Asp",
      "BASIC",
      "C",
      "C++",
      "Clojure",
      "COBOL",
      "ColdFusion",
      "Erlang",
      "Fortran",
      "Groovy",
      "Haskell",
      "Java",
      "JavaScript",
      "Lisp",
      "Perl",
      "PHP",
      "Python",
      "Ruby",
      "Scala",
      "Scheme"
    ];
    $( "#tags" ).autocomplete({
      source: availableTags
    });
  } );           
	   });
	}, 
})

output :
User-added image
    i hope it helps you.
      Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
    thanks

    http://sfdcmonkey.com
 
Mumbai SKIMumbai SKI
Thanks. Help alot
VINODKUMAR REDDY KALUVAVINODKUMAR REDDY KALUVA
Hi All,

I have a requirement for auto-completion in a normal text field but I'm getting in the lookup function i don't want in lookup, I'm looking for with normal text field autocompletion, can anyone help me ??

@Piyush_soni can please provide jquery links for the above code???
Anyone, please provide above JQuery Links where I can find and downland!...?????