columnControl searchList not working for Booleans and numbers

columnControl searchList not working for Booleans and numbers

TerraX3000TerraX3000 Posts: 21Questions: 7Answers: 1

Link to test case: https://live.datatables.net/tiwevaji/1/
Description of problem:

The columnControl searchList option is not working for Boolean data types and number data types.

The test case https://live.datatables.net/tiwevaji/1/ demonstrates this issue.

Data Type Search Number Search Text Search List
Number
Boolean -
Text -

Observations:
The searchList correctly lists the options for all data types.

However, selecting an option from the searchList does not filter the table for Boolean and number data types.

Link to Ajax data: https://dummyjson.com/todos



This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 64,798Questions: 1Answers: 10,728 Site admin
    Answer ✓

    Hi,

    Many thanks for the test case and clear description (as before) :).

    I've committed a fix and the nightly build now has the change. This is the updated example with the nightly.

    It comes down to the fact that DataTables does string based search, but the conversion for where booleans (etc) become strings isn't in the right place. I've got a note to change that for DT2.4. The change in ColumnControl is a workaround for the moment.

    Regards,
    Allan

  • TerraX3000TerraX3000 Posts: 21Questions: 7Answers: 1

    And thank you again for the quick fix, Allan!

  • TerraX3000TerraX3000 Posts: 21Questions: 7Answers: 1

    Hi, Allan,
    I see the update is available in the CDN download builder but not on NPM.

    Could you push ColumnControl v1.0.6 to NPM?

  • allanallan Posts: 64,798Questions: 1Answers: 10,728 Site admin

    Sorry - I just pushed a separate change and was surprised when I saw the npm publish emails coming in, then realised what I'd (not) done. It is up now.

    Allan

Sign In or Register to comment.