Problem with columnDefs example page

Problem with columnDefs example page

knuxylknuxyl Posts: 6Questions: 2Answers: 0

I noticed a typo in one of the documentation pages.

https://datatables.net/reference/option/columnDefs

At the bottom at example, it says
"Disable filtering on the first column:"

but the code it gives you is
"searchable": false

when it should be
"filterable": false

And does anyone know where I can find all the attributes I can modify with column or columnDefs? Thanks

Answers

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394

    In DataTables searchable and filterable are basically the same thing.

    AFAIK the columns/columnDefs are explained on the documentation page you linked to.

  • knuxylknuxyl Posts: 6Questions: 2Answers: 0

    When I used the searchable option it only disallowed the search feature but I could still sort the column. I guess filtering could mean searchable or filterable. Anyways, filterable wasn't on the page, I had to guess it.

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    edited June 2017

    There isn't a filterable option in DataTables. Any such parameter given would be ignored.

    DataTables uses the terminology search for user input values that will effect the display of the table since the filter() method will filter only a result set in an API instance (i.e. it has no effect on the display). So to try and minimise confusion (although there is still plenty of it) search and filter do actually mean slightly different things and I try to use the correct terminology whenever possible - although I do slip sometimes!

    And does anyone know where I can find all the attributes I can modify with column or columnDefs?

    The reference documentation.

    Allan

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin

    Hmmm - I can't get the Markdown linking to work with the automatic category selection... Click the "DataTables - Columns" button to show only the columns options (which will work for both columns and columnDefs).

    Allan

This discussion has been closed.