WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] sorting bug? table width (4 posts)

  1. ncurrier
    Member
    Posted 1 year ago #

    Typically I'm good at figuring out things myself or reading the threads and finding my question answered already. I can't find my solution.

    See my table at http://www.mangameslost.com/updated-nhl-man-games-lost-april-14-2013/

    You'll see that the sorting function does not work for the numbers as sorting will sort 100 before 43 and seems to be based on the first digit only (try and sort the column named 'Team Reported MGL' as an example).

    You'll also see the overhang on the table not staying in the container. I've tried width: auto but it doesn't seem to work although changing the font size to 10 or 11 pt should have done the trick.

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    The reason for this problem is the "DNR" value in the last row of that column. That forces the sorting to be done as strings and not as numbers (which is done in a different way, thus the unexpected result).

    About the width: That's because the data in the head row simply requires a certain minimum width. The browser can then not shrink the columns even further, so that the table spills out to the right.
    One possible solution for that could be to use "Horizontal scrolling", by clicking the corresponding checkbox on the "Edit" screen of the table.

    Regards,
    Tobias

  3. ncurrier
    Member
    Posted 1 year ago #

    Tobias,

    I've read many of your forum posts and you might be the friendliest developer I've come across in the past 15 years. I'm the one causing you the trouble! Thank you for your help. I hadn't considered that the text was not sortable with the numbers. Thank you for pointing it out.

    I think the horizontal scrolling option is a good solution and I'll try it out. I've already shrunk the text to 13px and shortened the header titles and don't think I should go much smaller.

    Cheers

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for the kind words!
    Good to hear that the hint about the text in that column and the "Horizontal Scrolling" will be helpful! :-)

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate TablePress here in the plugin directory. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic