Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Praveen Kumar
    Participant

    @praveenkumar98

    Hi Varun,

    Thanks for your response.

    I was wondering if it’s possible to add a debounce function without modifying the core BuddyPress files. I’ve attempted to create a custom file where I wrap the original remoteFilter function with a debounce function and then enqueue this script in the theme’s functions.php file.

    Here’s the approach I’ve taken:

    mentionsDefaults.callbacks.remoteFilter = debounce(function(query, render_view) {
    originalRemoteFilter.call(this, query, render_view);
    }, debounceTime);

    Could you please advise if this is the correct approach or if there is a better way to achieve this?

Viewing 1 replies (of 1 total)
Skip to toolbar