Can Filter Bar "reset filters" also reset Tribe Events Bar filter settings?

Home Forums Calendar Products Filter Bar Can Filter Bar "reset filters" also reset Tribe Events Bar filter settings?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1192804
    Megan Sukys
    Participant

    This is a continuation of this previous post:

    Integrating Filter Bar and Tribe Events Bar

    With a bit of CSS and JS hackery we have it all behaving pretty well. The only problem is that “reset filters” only resets the Filter Bar filters, not the Tribe Events Bar filters (date, search text, Near).

    Can you suggest a way to do that? Do those controls have any external methods that can reset them to blank/default? Is there a good place to add functionality to clicking on the reset link, in a way that will survive future TEC updates?

    Bob Meador
    Developer for GTCF

    #1193401
    Cliff
    Member

    Hi Ryan.

    You can enable SCRIPT_DEBUG to use the non-minified JS files.

    Looking into the source, I see Line 209 of /wp-content/plugins/the-events-calendar-filterbar/src/resources/js/filter-scripts.js is the JS that resets the filters. The targeted ID gets set from one of the 2 files in /wp-content/plugins/the-events-calendar-filterbar/src/views/filter-bar/

    That JS file gets enqueued at Line 206 of /wp-content/plugins/the-events-calendar-filterbar/src/Tribe/View.php

    I’d guess the only way to customize that JS is to dequeue it and enqueue your own modified version.

    Or (probably easier) you could just look at that JS function’s logic and piggyback/copycat it yourself to duplicate its functionality for your own custom inputs.

    I hope that helps get you further along with your customization!

    If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.

    #1203165
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Can Filter Bar "reset filters" also reset Tribe Events Bar filter settings?’ is closed to new replies.