DataTables 1.8.1 released

DataTables 1.8.1 released

allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin
edited June 2011 in Announcements
Hello all,

I've just tagged and released DataTables 1.8.1, the first maintenance update for DataTables 1.8. This release is small in the number of changes, but it brings a number of welcome bug fixes and a few new features. Top of the new features list is that the two form elements DataTables uses (filter and length) are now wrapped in tags to aid accessibility. You'll also notice that when you click on the text "Search" it now focuses automatically on the filtering input box.

In terms of bug fixes the most significant change is in how scrolling is handled when x-scrolling is disabled but the space given to draw the table is too small. Previously DataTables would try its best and emit an error - which would result in misaligned columns. Now it won't enter that error state and simply draw the table as small as it can be. This is particularly noticeable on pages where the table resizes with the browser window and you make the browser window small.

DataTables 1.8.1 package download:
http://datatables.net/releases/DataTables-1.8.1.zip

As always release notes are available by clicking the "notes" link on the 1.8.1 download:
http://datatables.net/download

If you haven't yet taken the step from 1.7.x to 1.8, or you are new to DataTables you might find the blog post introducing 1.8 interesting:
http://datatables.net/blog/DataTables_1.8

What's new in 1.8:
http://datatables.net/new/1.8

Finally, please consider supporting DataTables further development and support by making a donation to the project :-)
http://datatables.net/donate

Enjoy!
Allan

Replies

  • pgalganopgalgano Posts: 6Questions: 0Answers: 0
    I have a rendering issue I am seeing with the 1.8.1. Not sure if it was happening in 1.8 as there was a different issue where the container the table was rendering in was not displayed when rendering causing the width measurements to be to small versus what size the table actually had to render in when displayed.

    Not sure if this was related to the fix for the small table rendering change as specified above but the following block is causing a rendering issue where the table is going out 16px greater than the div container it is inside of.

    function _fnScrollDraw

    /* If x-scrolling is disabled, then the viewport cannot be less than the sanity width */
    if ( o.oScroll.sX === "" )
    {
    nScrollBody.style.width = _fnStringToCss( iSanityWidth+o.oScroll.iBarWidth );
    nScrollHeadInner.parentNode.style.width = _fnStringToCss( iSanityWidth+o.oScroll.iBarWidth );
    }

    iSanityWidth is the current width of the parent container and then the iBarWidth is adding 16px to it each time. If I comment out these two lines in the if block the rendering is as desired. What is the exact purpose of the block above?

    This is most noticable when the table first renders and I have 0 items in the aData array, showing the empty table message. There appears to be some correction logic of the headers that would fix the width assigned to the "dataTables_scrollHead" div that would make the width equal to the isanity value when a number of data objects in the array was passed in.
  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin
    You are absolutely correct - thanks for finding this and letting me know. This was introduced inadvertently in 1.8.1 - 1.8.0 will not have this problem. It was intended as the fix described in my post above for x-scrolling, but the check needs to be a lot tighter than it currently is it would seem. I'll fix this and commit in unit tests for it when I get home this evening.

    Regards,
    Allan
  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin
    I've just committed in a fix for this issue. The "nightly" now contains this fix (1.8.2.dev) and I've added a unit test so it can't reoccur.

    Regards,
    Allan
  • RockbRockb Posts: 97Questions: 0Answers: 0
    If I export a pdf file with columns, which aren't visible by standard ("bVisible": false), but which should be displayed in the pdf-document ("mColumns": [ 2 ]), the script doesn't create a separate column and overwrite the including elements with an existing one. Take a look at this screenshot: http://picplz.com/B7sJ All scripts are on the newest (beta) version.
  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin
    @Rockb: Has this changed as a result of the 1.8.1 release? If not, can you open a new thread for your question please.

    Allan
  • RockbRockb Posts: 97Questions: 0Answers: 0
    Hi Allan, thx for your (always) quick answer! Actually I don't know, cause I've started a different project with these new settings. Okay, let's start a new thread for this:

    http://datatables.net/forums/discussion/5581/pdf-document-with-overwrittenoverlapped-elements-for-columns-which-are-bvisible-off-by-standard
  • sd_zuosd_zuo Posts: 78Questions: 1Answers: 0
    Hello Allan,

    I has upgraded to 1.8.1. It seems that it has fewer problems about the null value issue.
    The new version is functioning after that I changed some scripts around my site now.
  • loveDTloveDT Posts: 8Questions: 0Answers: 0
    Hi,Allan,
    Is "rowspan" can be used in td elements in the newest verson?
    if not ,could you pls add this feature?

    Thanks
  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin
    @loveDT: No, rowspan is not supported in the tbody in this version, nor is it likely to be in future versions as it is a huge amount of work. There could be a branch which supported this feature in future, rather than having it in the core (since it would likely add a considerable amount of code to the library) but as I mention it will take a lot of work to fully support it.

    Allan
  • loveDTloveDT Posts: 8Questions: 0Answers: 0
    Hi Allan,
    since you mentioned DT doesnot support rowspan in tbody
    then my problem which you have seen here :
    http://www.datatables.net/forums/discussion/comment/23772#Comment_23772

    Is there any solution for me to realize this ?

    Glad to take discussion with you
    Thanks

    loveDT
  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin
    I've just added a reply in that discussion.

    Allan
This discussion has been closed.