Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature searchFade does not work #591

Closed
interceptor opened this issue May 15, 2024 · 1 comment
Closed

Feature searchFade does not work #591

interceptor opened this issue May 15, 2024 · 1 comment

Comments

@interceptor
Copy link

I Assume that all that one has to do is import the Module:

import 'datatables.net-plugins/features/searchFade/dataTables.searchFade.mjs';

then enable the feature when creating the Datatable instance:

searchFade: true

I get the following error:

TypeError: val is undefined
SearchFade dataTables.searchFade.mjs:45

I spent some time trying to understand the code, but am not sure what it is trying to do.

@AllanJard
Copy link
Contributor

With DataTables 2 SearchFade is a "feature" which must be placed somewhere around the table with the layout option - for example:

var table = new DataTable('#example', {
  layout: {
    topEnd: 'searchFade'
  }
});

https://live.datatables.net/cayazesu/1/edit

There it replaces the default search feature in the top right, but you could have both if you wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants