Do CascadePanes work when searchPanes is initialized in button?

Do CascadePanes work when searchPanes is initialized in button?

TomCorrTomCorr Posts: 24Questions: 3Answers: 0

Hi, When i use dom: 'Pfrtip' Cascade and all configs work, when i use dom: 'Bfrtip', no configs apply.

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 20,274Questions: 26Answers: 4,765
  • TomCorrTomCorr Posts: 24Questions: 3Answers: 0

    Yes, this is how i have it:

        $('#dttComponents').DataTable({
            searchPanes: {
                cascadePanes: true,
                controls: false
            },        
            buttons: [
                'copyHtml5',
                'excelHtml5',
                'csvHtml5',
                'pdfHtml5',
                'print',
                'searchPanes'
            ],        
            columnDefs: [
                {
                    searchPanes: {
                        show: true,
                    },
                    targets: [0,1,3],
                }
            ],
            dom: 'Bfrtip',
            responsive: true,
            searching: true,
            select: false,
            info: true,
            paging: true,
            ordering: false,
            scrollY: "50vh",
            scrollCollapse: true 
        });
    
  • kthorngrenkthorngren Posts: 20,274Questions: 26Answers: 4,765

    I copied your code into this Test Case and it seems to work. I used the Download Builder to generate the includes for Buttons, HTML5 Export, jszip, pdfmake, print, Responsive, SearchPanes and Select. Do you have all those installed?

    Maybe you can update the test case to replicate your issue.

    Kevin

  • TomCorrTomCorr Posts: 24Questions: 3Answers: 0

    I looked into your test case without modifying it, and if i choose Angelica Ramos, it should filter the rest of the column panes, and it is not.

  • kthorngrenkthorngren Posts: 20,274Questions: 26Answers: 4,765
    Answer ✓

    Sorry I didn't understand your initial question. Its a known issue, see this thread.

    Kevin

  • TomCorrTomCorr Posts: 24Questions: 3Answers: 0

    OK, Thank you i will be alert for this bug fix.

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    This was addressed last week. It'll be in the next release, but you can confirm the solution by using the nightly releases here. See example here.

    Colin

  • TomCorrTomCorr Posts: 24Questions: 3Answers: 0

    Thanks Colin, i confirmed your example,

    I'll be alert for the next release.

    Cheers
    Tom

  • maurog1987maurog1987 Posts: 2Questions: 0Answers: 0

    Hello, I still have this issue as of today 8/6/2020.
    I have the latest version downloaded (1.1.1) but when the searchPanes button is enabled, then all its options do not work, especially:
    - Cascading
    - layout
    - view total

    I attached a pic of my folder structure, to show all the modules I have downloaded.

    This is my code

    $('#main-table').DataTable({
                dom: 'Bfrtip',
                stateSave:true,
                searchPanes:{
                    cascadePanes: true,
                    layout: 'columns-4',
                    viewTotal: true
                },
                // dom: 'Pfrtip',
                buttons: [ 'copy', 'excel', 'pdf', 'colvis', 'searchPanes' ],
                fixedHeader: true,
                responsive: true,
                data: table_arr,
                columns: [
      ...
                ],
                deferRender: true
            });
    
  • polianomartinipolianomartini Posts: 2Questions: 1Answers: 0
    edited August 2020

    I'm also not able to use the SearchPanes options as a button in Bootstrap 4. :(

    SearchPanes-1.1.1

    Note: It would even be interesting if there was an overlay with a dark background when opening the pane.

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    @maurog1987 and @polianomartini - please link to test cases, and we're happy to take a look. It would be worth creating new threads to isolate the two issues.

    Colin

  • WNRCAMWNRCAM Posts: 6Questions: 1Answers: 0
    edited October 2020

    For me the same, searchPanes options are not respected when I remove de P from dom.

    searchPanes: {
    cascadePanes: true
    },

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. 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.

    Cheers,

    Colin

  • KaikonKaikon Posts: 3Questions: 1Answers: 0

    Hi @maurog1987 @polianomartini @WNRCAM

    I think I encountered the same issue as you mentionned, reproduce here : http://live.datatables.net/yajubifo/1/edit?html,js,output

    The correct way when you want to use the searchPanes button, is to implement the searchPanes config "inside" the button as mentionned in this thread : https://datatables.net/reference/option/button.searchPanes

    var table = $('#example').DataTable({
        dom: 'Bfrtip',
        buttons: [
          {
            extend: 'searchPanes',
            config: {
              cascadePanes: true
            }
          }      
        ]
      });
    

    Full exemple available here : http://live.datatables.net/yajubifo/2/edit?html,js,output

    Hope this help
    Regard's

  • WNRCAMWNRCAM Posts: 6Questions: 1Answers: 0

    HI, Yes, I solved this way too.

This discussion has been closed.