Problem with columnDefs example page
Problem with columnDefs example page
knuxyl
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
This discussion has been closed.
Answers
In DataTables searchable and filterable are basically the same thing.
AFAIK the columns/columnDefs are explained on the documentation page you linked to.
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.
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 thefilter()
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!The reference documentation.
Allan
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