in your docs:
https://preview.keenthemes.com/html/metronic/docs/general/search
for using this search you are using some timeout (I guess for wait for user finish typing), but we have an issue that if the user will type a character just before the process will finish, his new input will not take in account in your search.
this is because you are not reinitialize the "processing" value in when "_input" method is occure.
var _input = function() {
if ( _getOption("min-length") ) {
the.processing = false; // < ------------------------
if ( the.inputElement.value.length >= the.minLength ) {
_search();
} else if ( the.inputElement.value.length === 0 ) {
_clear();
}
}
}
Hi,
The 1500-second timeout is used for demo purposes only. You can remove it and replace the code with the actual Ajax request processing code. You can fully customize the code as per your requirements.
Regards.
If we remove the timeout the ajax requests not working properly because of the "processing" because its become false, if user types fast it not taking the last input.
Hi,
Noted, then you can adjust the timeout according to your project requirements. I hope it will fully solve your issue.
Regards.