From e70394961ca7b7f059c82ae6940d71c0c8f3f4ff Mon Sep 17 00:00:00 2001 From: Aaron George <79060613+octatau@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:54:31 -0500 Subject: [PATCH] Remove unused propoerties from object selector --- .../main/lwc/objectSelector/objectSelector.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/dlrs/main/lwc/objectSelector/objectSelector.js b/dlrs/main/lwc/objectSelector/objectSelector.js index c788569d..a7cf6662 100644 --- a/dlrs/main/lwc/objectSelector/objectSelector.js +++ b/dlrs/main/lwc/objectSelector/objectSelector.js @@ -22,18 +22,9 @@ export default class ObjectSelector extends LightningElement { searchRequired = true; maxSearchResults = 5; objectApiNames = []; - objectIconCache; - lstResult = []; // to store list of returned records - searchKey = ""; // to store input field value - isSearchLoading = false; // to control loading spinner - delayTimeout; selectedRecord = ""; - selectedRecordIconName; objects = []; - preventBlur = false; connectedCallback() { - this.selectedRecordIconName = this.iconName; - this.isSearchLoading = true; //GET LIST OF ALL OBJECTS getAllObjects() .then((objects) => { @@ -51,9 +42,6 @@ export default class ObjectSelector extends LightningElement { this.error = error; this.objects = {}; }) - .finally(() => { - this.isSearchLoading = false; - }); } // use the UI API to determine the iconName for each object @@ -84,10 +72,6 @@ export default class ObjectSelector extends LightningElement { const matches = iconNameRegEx.exec(o.iconUrl); if (matches) { o.iconName = `${matches[1]}:${matches[2]}`; - // We just got a new icon for the selected image! - if (o.fullName === this._currentSelection) { - this.selectedRecordIconName = o.iconName; - } } } }); @@ -110,7 +94,7 @@ export default class ObjectSelector extends LightningElement { // method to update selected record from search result handleSelectedRecord(event) { - const selectedName = event.detail.selectedOption.value; // event.target.getAttribute("data-objname"); // get selected record Idrd from list + const selectedName = event.detail.selectedOption.value; // get selected record Id from list this.selectObject(selectedName); this.lookupUpdatehandler(selectedName); // update value on parent component as well from helper function } @@ -125,7 +109,6 @@ export default class ObjectSelector extends LightningElement { } const obj = this.objects.find((o) => o.fullName === val); this.selectedRecord = obj.fullName; - this.selectedRecordIconName = obj.iconName; } // send selected lookup record to parent component using custom event