• Resolved opusklassiek

    (@opusklassiek)


    The table consists of appr. 200 rows. When clicking for instance on row 150 the file behind the link is opened as it should, but after going back using the familiar < button in the browser row 150 is not shown again, but the first 20 rows of the table (instead of row 150). This is not very convenient for visitors. The only alternative is the _blank function to open a new tab, but this is not recommended.

    • This topic was modified 1 year, 7 months ago by opusklassiek.
    • This topic was modified 1 year, 7 months ago by opusklassiek.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Indeed, this is the default behavior. You could change that by adding this to the “Custom Commands” text field in the “Table Features for Site Visitors” section on the table’s “Edit” screen:

    "stateSave": true

    Regards,
    Tobias

    Thread Starter opusklassiek

    (@opusklassiek)

    Dearest Tobias,

    I think that basically this should NOT be the default behavior as it is most inconvenient to visitors when dealing with a large table, like ours. And, additionally, the default should also be page numbers at the bottom, which are now lacking (only <previous and >next now). But apart from that: the default value (back to the first row of the table when clicking the < button in the browser) does not apply to all browsers and/or PC’s. I have four PC’s here, and with two of them there is no problem: when using the < bottom the browser page remains to be the (correct) last one coriginally clicked on and not the first part of the table. Last but not least the row number should be extended to ALL and not just to 100 (current limit). These are in my opinion nothing more but basic rules for any data table, and should not be part of any premium version. Thank you for your attention.

    • This reply was modified 1 year, 7 months ago by opusklassiek.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your feedback!

    First, let me clarify that this has nothing to do in any way with the TablePress Premium versions! These do not have more or different features regarding the things that you mentioned.

    Unfortunately, I do not know why two of your computers don’t have the desired behavior here. It could be related to their privacy settings or caching, maybe. The challenge with not returning to the previous position in the table when using the browser’s “Back” button is that this must be stored somewhere in the browser (because it’s actually the browser that is showing the table from the first page again). When the command that I posted above is used, the JavaScript code for this feature in TablePress tries to save the current position in the so-called LocalStorage (this is similar to e.g. browser cookies). Then, when the user returns to the page, the JS code asks the browser for that last stored position and shows that. If the browser however is configured to e.g. not return a value here (due to caching or privacy reasons), TablePress can not know what the last shown position is.

    As for showing numbers between the “Previous” and “Next” links in the pagination, or an “All” entry in the Pagination length dropdown: I totally see that these could be help with large tables, and adding this is possible now already, but I don’t think that all tables need this, which is why I didn’t make it the default. To add these, extend the command from above to

    "stateSave": true,
    "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ],
    "pagingType": "simple_numbers"

    Regards,
    Tobias

    Thread Starter opusklassiek

    (@opusklassiek)

    Seems to be an error in the code: no page numbers and no pagination.

    Thread Starter opusklassiek

    (@opusklassiek)

    Sorry, Tobias. Error seemed to be mine. Thank you for your excellent help.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

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

    Thread Starter opusklassiek

    (@opusklassiek)

    Hi Tobias, liebe Grüsse!

    Readers told me that when they use the ‘search’ option on the (home) table page that after having found what they had been looking for, not to be able to go back to the main page. I told them to clear the search box, which brings them automatically back to the home table page. Maybe, it would be better to have the ‘previous’ page option, clicking as much as needed to go back to the main page. That would be more intuitive, I think. Thank you for your attention.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I’m not really sure that I understand. Do you mean that the “Previous” link (for pagination) below the table should also clear that search? To me, that sounds very strange.

    Instead, I would recommend that you restore the native browser behavior of search fields, which is to add a “clear” button inside the search field. Your theme seems to be removing that right now. To restore it, please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .dataTables_filter input[type=search]::-webkit-search-cancel-button{
        -webkit-appearance: searchfield-cancel-button;
    }

    Regards,
    Tobias

    Thread Starter opusklassiek

    (@opusklassiek)

    After adding the code I get this after saving (first portion is red coloured and automatically removed):

    .tablepress thead th,
    .tablepress tfoot th {
    background-color: #F8F8F8;
    color: #FFFFFF;
    -webkit-appearance: searchfield-cancel-button;
    }

    I suppose this is it. In the search field there is no clear button.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    it looks like you might have added this inside an existing block of CSS code. It should instead go after the very end of the current “Custom CSS”.

    Regards,
    Tobias

    Thread Starter opusklassiek

    (@opusklassiek)

    This is it stands now:

    .tablepress thead th,
    .tablepress tfoot th {
    background-color: #F8F8F8;
    color: #FFFFFF;
    }

    .dataTables_filter input[type=search]::-webkit-search-cancel-button {
    -webkit-appearance: searchfield-cancel-button;
    }

    It still doesn’t work.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    it looks like there’s an entity #091; in the code, maybe from copy/pasting from the notification email?

    Please try copy/pasting the code directly from the gray box here in the forums.

    Regards,
    Tobias

    Thread Starter opusklassiek

    (@opusklassiek)

    No luck, Tobias. Same problem.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    it’s working for me on your site. Note that the “x” in the field is only shown when the search field is hovered or focussed while there is text inside of it.

    Regards,
    Tobias

    Thread Starter opusklassiek

    (@opusklassiek)

    GOT IT!

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Back to first page in table’ is closed to new replies.