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

Bug clearing the search field & using Savestate the table is not resized correctly #111

Open
lenamtl opened this issue Nov 21, 2018 · 3 comments

Comments

@lenamtl
Copy link

lenamtl commented Nov 21, 2018

Hi,

When using savestate and responsive there is an issue when clearing the search value as it is not resize / display the table correctly.

To reproduce
http://jsfiddle.net/lenamtl/nm5k1ro3/3/
search for Jane
click back button of your browser, then get back to Jsfiddle
clear the search value
Now the table is not displayed correctly

If you refresh the page this is ok.
This is not happening if you don't quit the page and clear the search field.
So this should be the same when we quit and go back then clear the search field.

As a temporary solution I'm looking for a way to attach a page reload when clearing the search field
https://datatables.net/forums/discussion/comment/143193#Comment_143193

@colin0117
Copy link
Collaborator

@lenamtl
Copy link
Author

lenamtl commented Nov 21, 2018

In fact, I posted my question first on forum and found out that this is a bug and this should be addressed to the dev...

@lenamtl
Copy link
Author

lenamtl commented Dec 6, 2018

The problem occurred also when using the pagination...

More info on how to reproduce:
When doing a search and the result have different column size from the page load, let say some column have less text then the search result have different data (so the column width are different) and this cause is not resized correctly.

or let say on page one you have small text in column then on next page you have one column with more content it's not resized correctly too.

Here is a temporary solutions

to fix the problem on search

table14.on('search.dt', function() {
      table14.columns.adjust();
      table14.responsive.recalc();
 });

to fix the problem when using pagination

table14.on('page.dt', function() {
     table14.columns.adjust();
     table14.responsive.recalc();
 });

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