This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component controller="ContactController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" > | |
<aura:attribute name="myContact" type="Map"/> | |
<aura:attribute name="icon" type="String"/> | |
<aura:attribute name="object" type="String"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doinit}"/> | |
<aura:registerEvent name="LookupEventToParent" type="c:LookupEventToParent"/> | |
<li role="presentation" class="slds-listbox__item " onclick ="{!c.onOptionClick}"> | |
<div id="option1" class="slds-media slds-listbox__option slds-listbox__option_entity slds-media_center" role="option"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class dynamicRowsController { | |
@AuraEnabled | |
public static void saveAccountsLwc(List<account> records){ | |
if(records.size()>0 && records != null){ | |
List<account> accs = new List<account>(); | |
for(integer i = 0; i < records.size(); i++) { | |
account acc = new account(); | |
acc.Id = records[i].Id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:event type="APPLICATION" description="Event template" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- DeleteNotifyComponentEvent --> | |
<aura:event type="COMPONENT" description="Event template"> | |
</aura:event> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:event type="COMPONENT" description="delete row"> | |
<aura:attribute name="rowIndex" type="Integer"/> | |
</aura:event> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- DeleteAttachmentsEvent --> | |
<aura:event type="APPLICATION" description="Event template"> | |
<aura:attribute name="toDeleteIds" type="Object[]"/> | |
</aura:event> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- LookupEventToParent --> | |
<aura:event type="COMPONENT" description="Event template"> | |
<aura:attribute name="selectedItem" type="Map"/> | |
</aura:event> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lwcListEditable"> | |
<apiVersion>45.0</apiVersion> | |
<isExposed>true</isExposed> | |
<targets> | |
<target>lightning__AppPage</target> | |
<target>lightning__RecordPage</target> | |
<target>lightning__HomePage</target> | |
</targets> | |
</LightningComponentBundle> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @lwc/lwc/no-async-operation */ | |
/* eslint-disable no-console */ | |
import { LightningElement, track } from 'lwc'; | |
import saveAccountsLwc from '@salesforce/apex/dynamicRowsController.saveAccountsLwc'; | |
import getAccounts from '@salesforce/apex/dynamicRowsController.getAccounts'; | |
import deleteAccounts from '@salesforce/apex/dynamicRowsController.deleteAccounts'; | |
import { ShowToastEvent } from 'lightning/platformShowToastEvent'; | |
export default class LwcListEditable extends LightningElement { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<lightning-card title="LWC Table"> | |
<lightning-button-icon icon-name="utility:add" slot="actions" onclick={add}></lightning-button-icon> | |
<lightning-button | |
label={toggleSaveLabel} | |
icon-name="utility:save" | |
slot="actions" | |
onclick={handleSave}> | |
</lightning-button> | |
<lightning-button |
NewerOlder