From 277feb0075c35ff030edd960195842430a0198d7 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Wed, 20 Nov 2019 10:12:45 +0000 Subject: [PATCH] Update - example: Note use of `-api columns().every()` in filtering example Thanks for the suggestion Martin --- .datatables-commit-sync | 2 +- examples/api/multi_filter_select.html | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 15928692..43746312 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -c4ed093af9bf5664f03d2f26be66363c2d4130b6 +b3337a076f8e3eaa12752ef1e300597b95230fc7 diff --git a/examples/api/multi_filter_select.html b/examples/api/multi_filter_select.html index c0028ae6..1ee14778 100644 --- a/examples/api/multi_filter_select.html +++ b/examples/api/multi_filter_select.html @@ -53,9 +53,12 @@ $(document).ready(function() {

This example is almost identical to text based individual column example and provides the same functionality, but in this case using select input controls.

-

After the table is initialised, the API is used to build the select inputs through the use of the column().data() method to get the data for each column - in turn. The helper methods unique() and After the table is initialised, the API is used to build the select inputs through the use of columns().every() to loop over the columns (the + columns() selector can also be used to limit the + selected columns if required), then the column().data() method is used to get the data for each column in turn. The helper methods unique() and sort() are also used to reduce the data for set input to unique and ordered elements. Finally the change event from the select input is used to trigger a column search using the column().search() method.