pstanoev / simple-svelte-autocomplete

Simple Autocomplete / typeahead component for Svelte
http://simple-svelte-autocomplete.surge.sh/
MIT License
464 stars 78 forks source link

How to use textCleanFunction without built-in cleaning? #176

Closed jtlapp closed 2 years ago

jtlapp commented 2 years ago

I am only able to do lookups containing capital letters when cleanUserText={true}, but I also need to be able to look up text containing punctuation, so I can't use this feature. (My searches are actually case-insensitive.)

I thought to override the built-in clean-up by providing my own textCleanFunction. But that function is only called when cleanUserText={true}, which results in the built-in cleaning also being applied.

How do I override built-in cleaning so that the user can search with capital letters? I'm happy to lowercase the text if that's what this package prefers.

Also, lowercaseKeywords isn't permitting capital letters, regardless of its value.

jtlapp commented 2 years ago

After much effort, I finally figured out to set localFiltering to false.