MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / useDelayedCaller

Function useDelayedCaller

web/pgadmin/static/js/custom_hooks.js:59–70  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

57
58
59export function useDelayedCaller(callback) {
60 let timer;
61 useEffect(() => {
62 return () => clearTimeout(timer);
63 }, []);
64
65 return (delay)=>{
66 timer = setTimeout(() => {
67 callback();
68 }, delay);
69 };
70}
71
72export function usePrevious(value) {
73 const ref = useRef();

Callers 3

QueryHistoryDetailsFunction · 0.90
CopyButtonFunction · 0.90
EmailValidateViewFunction · 0.90

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected