devbridge / jQuery-Autocomplete

Ajax Autocomplete for jQuery allows you to easily create autocomplete/autosuggest boxes for text input fields
https://www.devbridge.com/sourcery/components/jquery-autocomplete/
Other
3.57k stars 1.67k forks source link

cache previous request #847

Closed flash1nho closed 1 year ago

flash1nho commented 1 year ago

how about .trim() function for q param value ?

I think spaces without words can not be passed and we will not execute an extra request add after https://github.com/devbridge/jQuery-Autocomplete/blob/master/dist/jquery.autocomplete.js#L545 q = q.trim(),

request example without fix:

Parameters: {"query"=>"test "}

but request does not executing after fix

tkirda commented 1 year ago

This is only an assumption that it is useful for everyone. You may easy trim server side or provide onSearchStart where you can trim the query.

flash1nho commented 1 year ago

This is only an assumption that it is useful for everyone. You may easy trim server side or provide onSearchStart where you can trim the query.

thanks :+1: