Bug report: The "No data available in table" cell does not always span all columns
Bug report: The "No data available in table" cell does not always span all columns
When using DataTables 1.10.13 and the Responsive plugin (version 2.1.1), the "No data available in table" cell does not span all columns when some columns were hidden when the page was loaded/the table was initialized, but have become visible due to window resizing or similar. This bug does not appear in DataTables 1.10.10.
Steps to reproduce the problem:
- Open https://codepen.io/phistev/pen/peYKwM (or the HTML file in the attachment)
- Check that all seven columns are shown and that the "no data" cell spans all seven columns
- Resize the browser window (or use "Responsive Design Mode"/"Mobile view"/"Emulation"/...) to not show all columns (the number of columns hidden does not matter)
- Optional: Check that the "no data" cell still spans seven columns
- Refresh the page
- Check that the "no data" cell spans all visible columns
- Restore the original window size (or resize the window enough to show at least one more column)
Expected result
The "no data" cell still/again spans all visible columns
Actual result
The "no data" cell only spans the columns that were visible when the page was loaded/the table was initialized
Browsers tested in
- Firefox 52 (Ubuntu and Windows Server 2012R2)
- Chrome 57 (Ubuntu and Windows Server 2012R2)
- Internet Explorer 11 (Windows Server 2012R2)
- Microsoft Edge 14 (Windows 10)
Replies
Now that's what I call a bug report!!! .
It is ultimately caused by this block of code, which is calculating the visible columns.
What I've done is to have Responsive redraw the table when there are 0 records in the result set - commit. This change will be in the nightly version shortly.
Regards,
Allan