Implement LWC Lookup In Aura:
Check : LWC Lookup Component code here
Create new lightning aura component: HandleLwcLookupInAura
HandleLwcLookupInAura.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
<aura:attribute name="selectedRecordId" type="String" />
<aura:attribute name="selectedRecordName" type="String" />
<div class="slds-box">
<c:lwcLookup objectApiName='contact' iconName='standard:contact' onrecordselection="{!c.onAccountSelection}"/>
</div>
<div class="slds-box">
Selected Record Name : {!v.selectedRecordName} <br/>
Selected Record Id : {!v.selectedRecordId}
</div>
</aura:component>
HandleLwcLookupInAuraController.js
({
onAccountSelection : function(component, event, helper) {
component.set("v.selectedRecordName", event.getParam('selectedValue'));
component.set("v.selectedRecordId", event.getParam('selectedRecordId'));
}
})
No Comment to " How To Use LWC Lookup Component in Lightning Aura Component "