- Status changed to Fixed
almost 2 years ago 1:20pm 18 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.
How can I use the "Individual column searching" function for Drupal 8? I have seen that there is a patch for Drupal 7.
Thx
https://www.datatables.net/examples/api/multi_filter.html
jQuery(document).ready(function() {
// Setup - add a text input to each footer cell
jQuery('#datatable tfoot th').each( function () {
var title = jQuery(this).text();
jQuery(this).html( '<input type="text" placeholder="Search '+title+'" />' );
} );
// DataTable
var table = jQuery('#example').DataTable();
// Apply the search
table.columns().every( function () {
var that = this;
jQuery( 'input', this.footer() ).on( 'keyup change clear', function () {
if ( that.search() !== this.value ) {
that
.search( this.value )
.draw();
}
} );
} );
} );
I have integrated the javascript file into the website. But then I get the following error:
jquery.min.js?v=3.2.1:2 jQuery.Deferred exception: table.columns is not a function TypeError: table.columns is not a function
at HTMLDocument.<anonymous> (http://landwehrcie.de/themes/contrib/zurb_foundation/js/init_datatables.js?v=8.7.8:12:9)
at j (http://landwehrcie.de/core/assets/vendor/jquery/jquery.min.js?v=3.2.1:2:29999)
at k (http://landwehrcie.de/core/assets/vendor/jquery/jquery.min.js?v=3.2.1:2:30313) undefined
Thank you for your help
Fixed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.