title: jQuery DataTables: multi filter select Cannot set property 'nTf' of undefined
body: <p>I am trying to implement the following:
  <a href="https://datatables.net/examples/api/multi_filter_select.html" rel="nofollow">https://datatables.net/examples/api/multi_filter_select.html</a></p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div id="viewDataTableParentDiv"&gt;
      &lt;button class="btn btn-lg btn-warning loading-button"&gt;&lt;span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"&gt;&lt;/span&gt; Loading...&lt;/button&gt;
      &lt;table class="table table-striped table-bordered table-hover" id="viewDataTable" hidden data-parentId="viewDataTableParentDiv"&gt;
          &lt;thead class="table-header"&gt;
              &lt;tr&gt;
                  &lt;th&gt;Query Time&lt;/th&gt;
                  &lt;th&gt;Node RetrievalId&lt;/th&gt;
                  &lt;th&gt;Node Name&lt;/th&gt;
                  &lt;th&gt;Attribute RetrievalId&lt;/th&gt;
                  &lt;th&gt;Attribute Name&lt;/th&gt;
                  &lt;th&gt;Ordinal ID&lt;/th&gt;
                  &lt;th&gt;Raw Value&lt;/th&gt;
                  &lt;th&gt;Adjusted Value&lt;/th&gt;
                  &lt;th&gt;Type of Change&lt;/th&gt;
                  &lt;th&gt;Delta Change (last)&lt;/th&gt;
                  &lt;th&gt;Delta Change (first)&lt;/th&gt;
                  &lt;th&gt;&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tfoot&gt;
              &lt;tr&gt;
                  &lt;th&gt;Query Time&lt;/th&gt;
                  &lt;th&gt;Node RetrievalId&lt;/th&gt;
                  &lt;th&gt;Node Name&lt;/th&gt;
                  &lt;th&gt;Attribute RetrievalId&lt;/th&gt;
                  &lt;th&gt;Attribute Name&lt;/th&gt;
                  &lt;th&gt;Ordinal ID&lt;/th&gt;
                  &lt;th&gt;Raw Value&lt;/th&gt;
                  &lt;th&gt;Adjusted Value&lt;/th&gt;
                  &lt;th&gt;Type of Change&lt;/th&gt;
                  &lt;th&gt;Delta Change (last)&lt;/th&gt;
                  &lt;th&gt;Delta Change (first)&lt;/th&gt;
                  &lt;th&gt;&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/tfoot&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JavaScript:</strong></p>
  
  <pre><code>function initDataTable(tableId, ajaxData) {
  
      var greenUpArrow = '&lt;span class="glyphicon glyphicon-arrow-up text-success"&gt;&lt;/i&gt;';
      var redUpArrow = '&lt;span class="glyphicon glyphicon-arrow-up" style="color: red"&gt;&lt;/i&gt;';
      var greenDownArrow = '&lt;span class="glyphicon glyphicon-arrow-down text-success"&gt;&lt;/i&gt;';
      var redDownArrow = '&lt;span class="glyphicon glyphicon-arrow-down" style="color: red"&gt;&lt;/i&gt;';
  
      return $(tableId)
          .on('preInit.dt', function() {
              $('#pleaseWaitDialog').modal();
          })
          .DataTable({
              data: ajaxData,
              bAutoWidth: false,
              processing: true,
              dom: 'Bfrtip',
              processing: true,
              buttons: [
                  {
                      extend: 'excel',
                      text: 'Export (Excel)'
                  },
  
                  {
                      extend: 'csv',
                      text: 'Export (CSV)'
                  },
  
                  {
                      extend: 'pdf',
                      text: 'Export (PDF)'
                  }
              ],
              'columns': [
                  { 'type': 'date', mData: 'QueryTime' },
                  { 'type': 'num', mData: 'NodeRetrievalId' },
                  { 'type': 'string', mData: 'NodeName' },
                  { 'type': 'num', mData: 'AttributeRetrievalId' },
                  { 'type': 'string', mData: 'AttributeName' },
                  { 'type': 'string', mData: 'OrdinalIdString' },
                  { 'type': 'string', mData: 'AttributeRawValue' },
                  { 'type': 'string', mData: 'AttributeAdjustedValue' },
                  { 'type': 'string', mData: 'TypeOfChangeString' },
                  { 'type': 'string', mData: 'DeltaChangeSinceLastResult' },
                  { 'type': 'string', mData: 'DeltaChangeSinceFirstResult' }
              ],
              "columnDefs": [
                  {
                      "render": function (data, type, row) {
                          var mDate = moment.utc(data);
                          return mDate.tz(jstz.determine().name()).format('M/D/YYYY HH:mm:ss z');
                      },
                      'targets': 0
                  },
                  {
                      'targets': 1,
                      visible: false
                  },
                  {
                      'targets': 3,
                      visible: false
                  },
                  {
                      'targets': 8,
                      visible: false
                  },
                  {
                      "render": function (data, type, row) {
                          if (data == null) {
                              return "";
                          }
  
                          if (row["TypeOfStatusChangeString"] == "Good" &amp;&amp; row["TypeOfChangeString"] == "Increase") {
                              return data + ' ' + greenUpArrow;
                          } else if (row["TypeOfStatusChangeString"] == "Bad" &amp;&amp; row["TypeOfChangeString"] == "Increase") {
                              return data + ' ' + redUpArrow;
                          } else if (row["TypeOfStatusChangeString"] == "Good" &amp;&amp; row["TypeOfChangeString"] == "Decrease") {
                              return data + ' ' + greenDownArrow;
                          } else if (row["TypeOfStatusChangeString"] == "Bad" &amp;&amp; row["TypeOfChangeString"] == "Decrease") {
                              return data + ' ' + redDownArrow;
                          } else {
                              return data;
                          }
  
                      },
                      "targets": 9
                  }
              ],
              'order': [[0, 'desc']],
              initComplete: function () {
                  var parentDiv = $(tableId).attr('data-parentId');
                  var loadingButton = $('#' + parentDiv).find('.loading-button');
                  loadingButton.hide();
                  $(tableId).show();
  
                  this.api().columns().every(function () {
                      var column = this;
                      if (column.visible()) {
  
                          var select = $('&lt;select&gt;&lt;option value=""&gt;&lt;/option&gt;&lt;/select&gt;')
                          .appendTo($(column.footer()).empty())
                          .on('change', function () {
                              var val = $.fn.dataTable.util.escapeRegex(
                                  $(this).val()
                              );
  
                              column
                                  .search(val ? '^' + val + '$' : '', true, false)
                                  .draw();
                          });
  
                          column.data().unique().sort().each(function (d, j) {
                              if (d == null &amp;&amp; d === "") {
                                  select.append('&lt;option value="' + d + '"&gt;' + d + '&lt;/option&gt;')
                              }
                          });
  
                      }
  
                  } );
              } 
      });
  }
  </code></pre>
  
  <p>I am receiving the following error jquery.dataTables.min.js:27:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot set property 'nTf' of undefined</p>
  </blockquote>
  
  <p>I am not sure what the source of the problem is here.  Is it perhaps because some of the columns are not visible?  Is it maybe because some rows have "null" as their value?</p>
  
  <p>Has anyone else ran into this issue and know how to resolve it?</p>