Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [create-component]

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

0
votes
1answer
21 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
16 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-...
0
votes
0answers
19 views

lightning $A.createComponent doesn't execute the methods in the created instance

I have the below code to instantiate a custom lightning component in the init() method in the lightning controller, unfortunately this doesn't give me the expected output. can someone help? $A....
0
votes
2answers
68 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
231 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
158 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
380 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
99 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 ...
1
vote
1answer
35 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
2answers
174 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 ...
2
votes
1answer
217 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" ...
0
votes
0answers
78 views

Dynamic lightning component creation not working

I have a method in my lightning controller to create component dynamically and is not working as expected. Here is my code VFPage: <apex:page extensions="controller" standardController="Contact"&...
7
votes
1answer
487 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 ...
1
vote
0answers
82 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
567 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
499 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) { ...
2
votes
2answers
1k 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
1answer
381 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 ...
-1
votes
1answer
228 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-"+ ...
8
votes
5answers
7k 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:...
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: ...