drop down fix

This commit is contained in:
victorAnumudu
2024-12-07 07:10:08 +01:00
parent 73ca831e1a
commit 943818aafa
8 changed files with 111 additions and 19 deletions
+15
View File
@@ -0,0 +1,15 @@
function debounceFunction(func, delay) {
let timer;
return function(...args) {
// Clear the previous timer if the function is called before the delay
clearTimeout(timer);
// Set a new timer to execute the function after the specified delay
timer = setTimeout(() => {
func(...args);
}, delay);
};
}
export default debounceFunction