Delay DataTables search by 200ms (references #424)

This commit is contained in:
Bernd Bestel
2019-10-15 19:59:14 +02:00
parent 9e1804252e
commit e133508814
24 changed files with 61 additions and 45 deletions

View File

@@ -129,3 +129,19 @@ function IsJsonString(text)
}
return true;
}
function Delay(callable, delayMilliseconds)
{
var timer = 0;
return function()
{
var context = this;
var args = arguments;
clearTimeout(timer);
timer = setTimeout(function()
{
callable.apply(context, args);
}, delayMilliseconds || 0);
};
}