Questions tagged [create-component]

For questions concerning the $A.createComponent() method in lightning components.

Filter by
Sorted by
Tagged with
2
votes
1answer
40 views

Lightning component: Invalid Literal Value[1,1]: Javascript :Getting the below error at random when opening the component in ipad salesforce1 app

i have created a lightning component and that component is dynamically created and called from another component using $A.createComponent( dynamicComponent, I am getting the below error at random ...
2
votes
1answer
46 views

Is it possible to dynamically create LWC from aura component?

We can't dynamically create LWC like aura does. We can embed LWC in aura, is it possible to dynamically create LWC using $A.createcomponent within aura component?
1
vote
0answers
26 views

How to close dynamically created Tab in Lightning

On click of a button Tab is created dynamically, using attribute "endIconName":"utility:close", close icon placed in the tab. how to close this tab. $A.createComponent("lightning:tab", { "label":...
1
vote
1answer
476 views

Invoking another component in lightning salesforce

In my lightning component, calling a method on onclick event and in turn which calls an another component. which works fine but whenever the page is refreshed it fails to call the component on First ...
0
votes
1answer
49 views

Order of dynamically created components not correct until page refresh

I am dynamically creating multiple Lightning components in my Community. They are not displaying in the correct order until the page is refreshed. Thoughts? Here is what I want my page to look like -...
0
votes
0answers
131 views

Aura:iteration takes more time to load

I am creating a dynamic grid (table) with more than 10 rows and 10 columns, Displaying the record and editing. My question is server side takes say 2 seconds to load the data(querying data with 10-...
12
votes
5answers
11k views

How to close lightning:overlayLibrary custom modal?

The documentation shows how to close an overlay immediately after showing the modal, however, this is not very useful for real-life situations. I have a component which has a lightning:...
0
votes
2answers
195 views

Import and use strike components

I'm new to salesforce development so this will be probably a very trivial question but I'm stuck here. I'm trying to import and use Strike lookup component So I have imported all the files in the ...
0
votes
2answers
692 views

Dynamically creating lightning:inputField with a div

Currently I have this loop which can dynamically create a lightning:inputField: for(var i = 0; i < editFieldsToRender.length; i++) { $A.createComponent ( "...
2
votes
1answer
294 views

Can not instantiate any component from JavaScript in lightning

I can not instantiate any component from JavaScript in lightning. 1. I took a specific component namespace:ModuleCard and checked that when I include it statically (just put <namespace:ModuleCard/&...
1
vote
1answer
588 views

$A.CreateComponents callback is not working

The issue is that createComponents method is being invoked but the $A.CreateComponents callback is not getting executed controller ({ doInit : function(component, event, helper) { ...
3
votes
1answer
242 views

Lightning component not rendering dynamically created lightning components

I am trying to create a lightning component that gets data from a server and displays them in individual lightning components which are dynamically created. I built a prototype, and I am trying to get ...
2
votes
2answers
355 views

Dynamically created component executing method twice in communities

following the Dynamically Creating Components component documentation, I have created a button in my lightning communitiy that does the following: Creates a modal Creates input buttons based on a an ...
1
vote
1answer
46 views

Re-create or Reload Lightning component from Visualforce page

I have a requirement to Reload a lightning component from a Visualforce page based on the Tab clicked in VF page with different Values. <a id="{!formKey}" onclick="hideShowPickList('{!...
2
votes
1answer
365 views

Dynamically created ltng:require component results in 503

If I try and create a ltng:require component for a script dynamically, I get a 503 server error: component.cmp <aura:component implements="forceCommunity:availableForAllPageTypes" access="global" ...
7
votes
1answer
839 views

$A.createComponent requires aura:dependency to work for first use

I posted this question on Twitter and folks seemed to feel this wasn't expected behavior, so posting here to see if others have experienced\have better solution I have three components. CMP A is a ...
2
votes
2answers
2k views

Action failed: lightning:button$controller$handleClick [d.run is not a function]

I have a lightning component called modal which is used in another component called Split, the modal takes an array of buttons to render them (and does some more) I have a working version of it in ...
1
vote
0answers
120 views

How to Set options dynamically ui:inputSelect created by CreateComponent

I have created ui:inputSelect using CreateComponent method. I have set onchange event on that inputSelect. onchange of an controlling field I have to set options for another inputSelect(dependent ...
1
vote
2answers
668 views

Dynamically created html tag is not working in IE

I tried to create a HTML Div element dynamically with $A.createComponents(); It's working fine in chrome, safari, firefox, but in IE, it throws an error This page has an error. You might just need ...
2
votes
3answers
807 views

Unknown component 'markup://'… on $A.createComponent

I have this error when trying to dynamically create a component, where the first time it runs it runs okay but if run again afterward it errors. renderListItems: function (cmp, helper, recordIds) { ...
-1
votes
1answer
333 views

div element not found while using $A.createComponent [duplicate]

I am trying to create a div using $A.createComponent but its throwing error. `$A.createComponent("aura:HTML", { "tag": "div", "HTMLAttributes":{"id": "filter-"+ ...
1
vote
1answer
2k views

Dynamically create a tab in Lightning component

I have a lightning:tabset with one tab containing a list of records. When user clicks on a button next to a record I want to display a second tab with the record detail. My component looks like this: ...