question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty yadcf settings array

See original GitHub issue

I’d like to have the ability to give empty settings array object to the plugin so yacdf is not active even though it’s applied to the datatable, like this:

var myDataTable= $('table').dataTable({
					}).yadcf( [ ]);

Because I’m providing dynamic options array based on a set of conditions and there’s a case where no yadcf filter should appear at all. I’m currently tricking it by providing out of bound col number:

yadcfColumnsOptions = [{
  column_number: 500
}

But this causes a js error in the plugin.

Thanks,

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ayyadalaacommented, Jun 11, 2019

Got it, thanks for your reply. I think this issue can be cancelled as invalid.

0reactions
ayyadalaacommented, Jun 11, 2019

Worked well, just a note for whoever reading this thread: Make sure to instantiate your datatable with capital D (as stated on yacdf site) like this:

var myDataTable= $('table').DataTable({
//your datatable options
});

Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

YADCF Multiselect Return Empty Record - php - Stack Overflow
The datatable and YADCF does not return any record when using multiselect filter from YADCF plugins. Here the screenshot Empty Record when ...
Read more >
yadcf - Yet Another DataTables Column Filter - GitHub
predefined data source for filter (array of strings or objects); mData support (including deeply nested objects); ability to place the filter in an...
Read more >
Yet Another DataTables Column Filter (yadcf) 0.9.3.beta
predefined data source for filter (array of strings or objects); mData support (including deeply nested objects); ability to place the filter in an...
Read more >
Custom Filter using ext.search help - DataTables
I am trying to make a custom filter/search for multiple checked values, but nothing is happening. $.fn.dataTable.ext.search.push( function( ...
Read more >
Using jQuery DataTables and yadcf
... of data using the jQuery yadcf plugin, that runs with DataTables. ... is not possible to add another filter, or clear the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found