SearchPanes Filter Button Text with Number of Filters Applied

SearchPanes Filter Button Text with Number of Filters Applied

tomizechstersontomizechsterson Posts: 4Questions: 1Answers: 0

Is there any built-in way to have the SearchPanes extension display something like "Filters (2)" on the filter button when you're already setting the language.searchPanes.collapse option on the data table?

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @tomizechsterson ,

    Yes that is possible, this is a feature that is going to be available in SearchPanes 1.1 which we hope will be released soon. In the mean time take a look at this example which shows how to do this.

    This will be available in the next SearchPanes release which we hope will be in the next few weeks. Until then you can access the fix from the nightly builds.

    Hope this helps,
    Sandy

  • tomizechstersontomizechsterson Posts: 4Questions: 1Answers: 0
    edited May 2020

    Hi @sandy ,

    I tried adding those 0, 1, and _ options to the collapse object, and it ended up breaking the pagination and the search pane functionality entirely. Is there a minimum version required for this to work?

  • kthorngrenkthorngren Posts: 21,171Questions: 26Answers: 4,922

    In order to get this fix you will need to use the nightly builds that Sandy linked to. Once SearchPanes 1.1 is available you can switch from the nightly builds to 1.1.

    Kevin

  • tomizechstersontomizechsterson Posts: 4Questions: 1Answers: 0

    Ah ok, good to know. I'll look into that, then

    Thank you!

  • tomizechstersontomizechsterson Posts: 4Questions: 1Answers: 0

    Just tried updating to the nightly builds of all the referenced scripts and css's from the sample (including the minified versions), and the data table still breaks. In the console I see an error saying a.replace is not a function in datables.min.js.

    I'm also not sure how to update the top-level datatables.js and related files now that I'm trying to use the nightly builds.. It's looking like we'll just have to forgo this feature until the official version gets released

  • kthorngrenkthorngren Posts: 21,171Questions: 26Answers: 4,922
    edited May 2020

    I see that error was in an old version of buttons.js. Not saying thats the problem you are having. What version of Datatables, Buttons and Select are you using?

    Here is a test case with the lates of those three and the nightly SearchPanes. It seems to work. Maybe you can update it to show the issue. Waiting for the release will likely cause you to troubleshoot this problem then.
    http://live.datatables.net/yahibapu/1/edit

    OR maybe you can use the Download Builder to get the latest versions to use with the SearchPanes nightly.

    Kevin

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    We're aiming to make the releases tomorrow (Monday), so it's probably worth holding off spending too much effort on this and checking it then,

    Colin

This discussion has been closed.