3

Try this: if(!window.subscribed) { helper.subscribe(component, event, helper); window.subscribed = true; } Actually it would be better if you use window.subscribed = true; in success callback of subscription.


3

You need to declare a method in the controller that calls the helper, not invoke the helper directly on button click. Additionally, avoid using the same name in your controller and helper functions. ex. callInit : function(cmp, event, helper){ helper.initForm(); }


3

Yes, its possible to use a custom label in aura:if, you just have minor syntax error, following would work: <aura:if isTrue="{!$Label.c.FirstLabel == 'your value'}"> <c:MaintenanceBannerComponent /> </aura:if> Better place would be to use a custom setting instead of a label, as its much easier to manage.


2

Yes, you can implement this feature. You may add the event listener for the whole window on a keydown event or even keydown combination. I would prefer adding window event listeners on render event. Why? Because the render event is preferred and easier to use than the alternative of creating a custom renderer. Handle this event to perform post-...


2

Two options here. I discovered that using css with the following will work: .THIS table { table-layout: fixed; } Another option suggested by sdandamud1 is to use ui:inputDate instead of lightning:input type date.


2

As Raul, suggested you can use something like <aura:if isTrue="{!$Label.c.MaintenanceMessage} == 'true'}"> <c:MaintenanceBannerComponent /> </aura:if> as true would be a String instead of boolean It would work, but would like to point few points. 1) Its a Custom Label , which accepts free text, thus there is big chance that a human ...


1

Salesforce documentation says that We recommend using lightning:navigation component with the standard__recordPage page type instead. force:navigateToSObject is old way of navigation and creates unreadable url format. But with the introduction of lightning:isUrlAddressable interface and lightning:navigation library, we can have user readable URL formats ...


1

In both Aura and Web Components, you simply add an event listener to window directly. // Aura: controller // doInit: function(component, event, helper) { window.addEventListener('beforeunload', helper.beforeUnloadHandler.bind(helper)); } // Aura: helper // beforeUnloadHandler(event) { console.log('before unload handler has been called.'); } // LWC ...


1

You can add event listener like below: $A.createComponent( 'c:myCustomChild', { onsubmitsuccess: component.getReference("c.handleSubmitSuccess"), quoteVariationId: angebotsvarianteId }, function(newCustomPosCreate, status, errorMessage) { if (status === 'SUCCESS') { // ------...


1

Today changes to cross-record summary fields, like rollups, are not detected by Lightning Data Service. We're actively working on a feature whereby Lightning Data Service (and all of its @wire adapters) will automatically provision a new version of records when such fields change regardless of the technology that triggered the change: LWC, Aura, Visualforce, ...


Only top voted, non community-wiki answers of a minimum length are eligible