Skip to content
Advertisement

throttle function broke my input live search

I am trying to throttle my html on input when user enters some words into search field there must be a redrawing of the block. When I implemented throttle function into my code, the live search stopped working, now the card redrawing does not happen

JavaScript

Advertisement

Answer

Your throttle returns a function. You called throttle() but you didn’t use the function it returns.

You should do something like that

JavaScript

That way, you define a throttled version of your function that you call on input

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement