From d29f75b84fccd06917fb8e2c2ee70e9d76f868cd Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期四, 11 四月 2024 20:15:54 +0800
Subject: [PATCH] 123

---
 force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js b/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js
index aa4afc2..319c137 100644
--- a/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js
+++ b/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-05-25 13:59:44
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-08-01 15:34:21
+ * @LastEditTime: 2023-09-27 15:30:05
  */
 import { LightningElement, track, api } from 'lwc';
 import getRecordsByName from '@salesforce/apex/lexLookupController.getRecordsByName'
@@ -43,11 +43,14 @@
         
     }
     connectedCallback(){
+        
         if(this.initValue != '' && this.initValue != undefined && this.initValue != null){
             this.recordselected = true;
             this.selectedValue = this.initValue;
         }
     }
+   
+    
     @api
     letDisabledTrue(){
         this.recordselected = false;
@@ -65,9 +68,18 @@
     //Method to clear search list and show selected value.
     @api
     clearSelection() {
+        console.log('qwer');
         this.recordselected = false;
         this.selectedValue = "";
         this.recordsList = undefined;
+        const customEvent = new CustomEvent('buttonclick', {
+            bubbles: true,  // 浣夸簨浠跺啋娉�
+            composed: true  // 浣夸簨浠跺彲浠ヨ法shadow boundary浼犳挱
+        });
+        this.dispatchEvent(customEvent);
+    }
+    dontClose(event){
+        event.preventDefault();
     }
 
     //Method to pass selected record to parent component.
@@ -85,4 +97,7 @@
         });
         this.dispatchEvent(selectedEvent);
     }
+    clear(){
+        this.recordsList = undefined;
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.1