SearchPanes was displaying but nothing was filtered when clicking on the field.

SearchPanes was displaying but nothing was filtered when clicking on the field.

acroposeacropose Posts: 11Questions: 3Answers: 0
edited March 2021 in Free community support

I can't filter any field with search panes. The interface displayed but it does nothing. And when I click for the first time in one of the selects I have an error returned in the console.

here is my test case : https://jsfiddle.net/sj4byvm6/

here is some console error :

datatables.min.js:330 Uncaught TypeError: f.filter.replaceAll is not a function
    at k._search (datatables.min.js:330)
    at Array.s.searchFunction (datatables.min.js:294)
    at Sb (datatables.min.js:71)
    at ya (datatables.min.js:71)
    at ja (datatables.min.js:59)
    at D.<anonymous> (datatables.min.js:136)
    at D.iterator (datatables.min.js:129)
    at D.<anonymous> (datatables.min.js:136)
    at D.draw (datatables.min.js:132)
    at k._makeSelection (datatables.min.js:327)

here is my initialization code :

$("#echeancier").DataTable({
    searchPanes: {
            viewTotal: true,
            cascadePanes: true,
            columns: [0,1,4,6,9]
    },
    dom: "Pfrtip",
    order: [[ 0, "asc" ], [ 1, "asc" ]],
    responsive: true,
    orderMulti: true,
    lengthMenu: [
            [ 25, 50, 100, -1 ],
            [ "25", "50", "100", "Afficher Tous" ]
        ],
   language:{
      decimal:"",
      emptyTable:"Pas de données disponible dans la table",
      info:"Affiche _PAGE_ sur _PAGES_",
      infoEmpty:"Aucune données disponible",
      infoFiltered:"(flitrer depuis un total de _MAX_ total lignes)",
      infoPostFix:"",
      thousands:",",
      lengthMenu:"Affiche _MENU_ ligne par page",
      loadingRecords:"Chargement...",
      processing:"Traitement...",
      search:"Rechercher:",
      zeroRecords:"Aucune données trouver",
      paginate:{
         first:"Premier",
         last:"Dernier",
         next:"Suivant",
         previous:"Precedent"
      },
      aria:{
         sortAscending:": activer pour trier par ordre ascendant",
         sortDescending:": activer pour trier par ordre descendant"
      }
   }
   });

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770

    Your test case seems to be working correctly. Can you provide details of how to generate the error or update the test case to show the error?

    Kevin

  • acroposeacropose Posts: 11Questions: 3Answers: 0
    edited March 2021

    If you try to click on search panes filter, that will not filter the array and if you click on the filter for the first time you can see a console error.

    For example, click on "2025" field in year search panes and you will see every row when there should be only one. And you can see that there are still 0 active filters but the field is selected.

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770
    Answer ✓

    I don't see an error when clicking on 2025 and the result is one item shown in the table:

    Wonder if its a browser issue. I'm using Chrome on the Mac. What browser are you using? Can you try others? Maybe try clearing the browser's cache or using incognito mode.

    Kevin

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

    Yep, working for me too - FF and Chrome on Ubuntu.

    Colin

  • acroposeacropose Posts: 11Questions: 3Answers: 0

    Yes It comme from our version of chrome I will change it ^^'

This discussion has been closed.