searchPanes show/hide toggle

searchPanes show/hide toggle

minobuminobu Posts: 23Questions: 8Answers: 2

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

The image above is how I have things set up currently. SearchPanels only shows after clicking the Show Filters button. The panels will hide if a user clicks anywhere outside of the panels Which is ok for a popup but as this is a large table a popup is not great. Ideally, that Show Filters button would change to Hide Filters on Click/touch and hide the searchPanes. Is this possible? I can't seem to find a id for the button so I cant target it with my own custom function/handler.

Button Code for searchPanes:
{
extend: 'searchPanes',
text: 'Filters',
config: {
cascadePanes: true
}

        },

language: { searchPanes: { clearMessage: 'Cancel selections', collapse: {0: 'Show filters', _: 'Filter (%d)',_:'Filters (%d)'} } },

Thanks for you help,
Matt

This question has an accepted answers - jump to answer

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi @minobu ,

    Take a look at this thread and more specifically this example. It's using a custom button to collapse the SearchPanes container.

    I think that is what you are looking to do? If not please could you link to your page, or create a test case. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Thanks,
    Sandy

  • minobuminobu Posts: 23Questions: 8Answers: 2

    Hi @sandy ,

    That's exactly what I'm after! Thank you for your help. Sorry for late reply been away over the weekend.

    I did try searching the forums for a possible solution but did not come across the thread you linked. Thanks again very helpful.

  • nilesh1130nilesh1130 Posts: 8Questions: 0Answers: 0

    Hi sendy,

    " this example " link code which i exactly want but initially searchpanes container will hide if user click on button then after it show searchpanes container will you help me for this please

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

    @nilesh1130 that link didn't make it onto your message, please can you repost, and give steps on how to reproduce, as I'm not following your description there.

    Colin

  • nilesh1130nilesh1130 Posts: 8Questions: 0Answers: 0

    http://live.datatables.net/porogoyo/1/edit

    same code need but only difference is initially its hide when user click on filter button then after container show otherwise its hide from user

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @nilesh1130 ,

    You just need to add the style to SearchPanes on initialisation. Take a look at this example.

    Thanks,
    Sandy

  • nilesh1130nilesh1130 Posts: 8Questions: 0Answers: 0

    @sandy Thank You so much you save my life ;)

This discussion has been closed.