| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-05-25 13:59:44 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-08-16 13:59:32 |
| | | * @LastEditTime: 2023-09-27 15:30:05 |
| | | */ |
| | | import { LightningElement, track, api } from 'lwc'; |
| | | import getRecordsByName from '@salesforce/apex/lexLookupController.getRecordsByName' |
| | |
| | | |
| | | } |
| | | connectedCallback(){ |
| | | |
| | | if(this.initValue != '' && this.initValue != undefined && this.initValue != null){ |
| | | this.recordselected = true; |
| | | this.selectedValue = this.initValue; |
| | | } |
| | | } |
| | | |
| | | |
| | | @api |
| | | letDisabledTrue(){ |
| | | this.recordselected = false; |
| | |
| | | //Method to clear search list and show selected value. |
| | | @api |
| | | clearSelection() { |
| | | console.log('qwer'); |
| | | this.recordselected = false; |
| | | this.selectedValue = ""; |
| | | this.recordsList = undefined; |
| | |
| | | composed: true // 使事件可以跨shadow boundary传播 |
| | | }); |
| | | this.dispatchEvent(customEvent); |
| | | } |
| | | dontClose(event){ |
| | | event.preventDefault(); |
| | | } |
| | | |
| | | //Method to pass selected record to parent component. |
| | |
| | | }); |
| | | this.dispatchEvent(selectedEvent); |
| | | } |
| | | clear(){ |
| | | this.recordsList = undefined; |
| | | } |
| | | } |