You need to sign in to do that
Don't have an account?
Rowan Christmas
Lightning Autocomplete, issues importing jquery-ui
Hi all,
I was hoping to use this component: http://peterknolle.com/lightning-component-autocomplete/ for doing Autocomplete in Lightining. But it seems to not have been updated to use ltng:require.
The post references Skip Sauls "require" component (https://login.salesforce.com/packaging/installPackage.apexp?p0=04tB000000011BX ), which I believe is out of date with the introductin of ltng:require, and that component doesn't seem to install anymore anyways :)
I switched out to using:
In place of the require plugin. But I am consisntly getting this error:
Thanks!
I was hoping to use this component: http://peterknolle.com/lightning-component-autocomplete/ for doing Autocomplete in Lightining. But it seems to not have been updated to use ltng:require.
The post references Skip Sauls "require" component (https://login.salesforce.com/packaging/installPackage.apexp?p0=04tB000000011BX ), which I believe is out of date with the introductin of ltng:require, and that component doesn't seem to install anymore anyways :)
I switched out to using:
<ltng:require scripts="/resource/jquery_js, /resource/jquery_ui_js" styles="/resource/jquery_ui_css" afterScriptsLoaded="{!c.doInit}"/>
In place of the require plugin. But I am consisntly getting this error:
ReferenceError: Can't find variable: jQuery (anonymous function)jquery_ui_js:5 (anonymous function)jquery_ui_js:5:84Which seems like jquery-ui is getting loaded in a weird way? The static resources for each of these files is correct, and the web inspector shows all the resources correctly loaded after the fact. Is there something else I should be doing to get this to all work, or is there a better solution to doing autocomplete in Lightning?
Thanks!
Component:
Controller:
Also, if you are trying to get the Autocomplete component working that I linked above, you may need change:
to
Maybe it's because I'm not in a namespace? Or I'm embedding the components in another component rather than the App level? But changing the event type to APPLICATION (which I know is a larger scope...) made it actually work properly.