Does SearchPanes work with select2 extension? More rows found than announced by searchpane....

Does SearchPanes work with select2 extension? More rows found than announced by searchpane....

rostrost Posts: 26Questions: 9Answers: 1

When using searchpanes on fields filled with multiple, separated values (eg: Abbrecher|alleinerziehend|schulpflichtig "nein"|U25 (unter 25 Jahre)) searchpane might announce for "Abbrecher" 2 rows found, while the table will display 4 rows (found correctly). Same when using the 'cascadePanes' - option.

Is it a problem because of using pipe ('|') - separated values? Could anyone give a hint, how to handle that issue?

This question has an accepted answers - jump to answer

Answers

  • rostrost Posts: 26Questions: 9Answers: 1

    Maybe my description is too short, but as a newbie I don't know which information could be useful... to explain better what is the problem, maybe this screenshot helps:

    I really would appreciate any comment or hint, because I'm quite sure I missed something important - but after hours and hours I'm stuck :-/

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

    Hi @rost ,

    Have you seen this example which is splitting on comma seperated values?

    To help further we really would need to see a running test case showing the issue. This could either be a link to your page, or a recreation on http://live.datatables.net/. 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.

  • rostrost Posts: 26Questions: 9Answers: 1

    Thank you for highlighting the example - I saw it before, but obviously did not get into it deep enough...

    What made the trick: the serverside-reformatting
    ->getFormatter( 'Format::explode' )
    ->setFormatter( 'Format::implode' )
    seems to confuse searchPanes; when using
    separator: ","
    in field configuration (like Allan recommended in https://datatables.net/forums/discussion/60172 ) it works using your given example.

    Thanks so much again! :-)

This discussion has been closed.