pozil / sfdc-ui-lookup-lwc

Salesforce Lookup Component built with Lightning Web Components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set MINIMAL_SEARCH_TERM_LENGTH to 1, or make it a configurable variable

1903Daniel opened this issue · comments

Hi,

I do have a use case where we need to search for a number with one digit, and that should return results. However, MINIMAL_SEARCH_TERM_LENGTH is set to 2 in line 11 of the JavaScript. Therefore, I need to patch my usage of the component to 1.

Can you either set the value to 1, or make it a configurable variable?

Hi @1903Daniel, thanks for the proposal. I believe that your use case is a corner use case but I feel that some people might want longer search terms in order to limit the number of server calls so I've made this a custom attribute (see minSearchTermLength).