buli
2023-05-22 71b93327e8f3fb3bffffc7c033c1f782e7b6ab32
force-app/main/default/lwc/lexLookup/lexLookup.js
@@ -26,6 +26,7 @@
    @api newRecordOptions = [];
    @api minSearchTermLength = 2;
    @api isDisabledForDealerText = false;
    @api accountValue = '';
    // Template properties
    searchResultsLocalState = [];
@@ -138,6 +139,7 @@
    @api
    getSelection() {
        console.log('get selection:' +this._curSelection);
        return this._curSelection;
    }
@@ -262,6 +264,7 @@
            // If the user presses enter, and the box is open, and we have used arrows,
            // treat this just like a click on the listbox item
            const selectedId = this._searchResults[this._focusedResultIndex].id;
            console.log('selectedid:'+selectedId);
            this.template.querySelector(`[data-recordid="${selectedId}"]`).click();
            event.preventDefault();
        }
@@ -445,6 +448,8 @@
    }
    get getSelectIconName() {
        if(this._curSelection[0])
            console.log('this._curSelection[0].icon = ' + this._curSelection[0].icon);
        return this.hasSelection() ? this._curSelection[0].icon : 'standard:default';
    }
@@ -453,6 +458,9 @@
    }
    get getInputValue() {
        if(this.accountValue != ''){
            return this.accountValue;
        }
        if (this.isMultiEntry) {
            return this._searchTerm;
        }