• Resolved LoriT

    (@lteachum)


    Hello!
    I’m using a very large table and have it set to show 100 rows. When you click on the page 2, the list shows at the bottom of the page, but it “should” show at the top of the page. Is there a setting I’m missing? I’ve searched the forum and don’t see a question like that.
    I’m accustomed to adding code to custom css, but I have no idea what code I should add.
    Can you please assist?

    If you need to view the page, I’ll need to give you rights to view it.
    Thank you so much!

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

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This essentially happens when you show more rows that fit on the page, or if the individual row height varies.
    For a solution, please see https://www.ads-software.com/support/topic/scroll-to-top-14/

    Regards,
    Tobias

    Thread Starter LoriT

    (@lteachum)

    Hi Tobias!
    I tried the suggestion and I even made the 2 changes you specified yet it still doesn’t work ??
    Also, now the default is to show only 10 rows and I have it checked to show 100 rows.
    Any other ideas?
    Thank you!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I’m seeing an error message related to the first change from https://www.ads-software.com/support/topic/scroll-to-top-14/#post-14604911 (removing that one line) right now. Are you sure that that line has been removed?
    Also, the second change doesn’t seem to have been performed?

    Regards,
    Tobias

    Thread Starter LoriT

    (@lteachum)

    That’s strange. ok.
    I created a file ending in php. Pasted your code. Changed the lines you specified (see below).
    I just reuploaded the file. Still doesn’t work. What else could it be? Here’s what I have in my file…

    add_filter( ‘tablepress_shortcode_table_default_shortcode_atts’, ‘tablepress_add_shortcode_parameters_pagination_scrolltotop’ );
    add_filter( ‘tablepress_table_js_options’, ‘tablepress_add_pagination_scrolltotop_js_options’, 10, 3 );
    add_filter( ‘tablepress_datatables_command’, ‘tablepress_add_pagination_scrolltotop_datatables_command’, 10, 5 );

    And at the bottom I have

    {$name}.on( 'page.dt', function() {
    	setTimeout( function() {
    		$( document ).scrollTop( $( {$name}.table().container() ).offset().top );
    	}, 10);
    } );
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    when I open your link from above, I’m taken to a password-protected page.
    At the bottom, I see an error message related to the tablepress_add_pagination_scrolltotop_js_parameter function (which is from the first line to remove). In the page source, I can see the second line that needs a change. So, this all indicates that the PHP file still has the unmodified code.

    Regards,
    Tobias

    Thread Starter LoriT

    (@lteachum)

    ok, so I have no idea what happened, but strangely, the changes weren’t made to the file – you were right! I made the changes and it works now. Thank you so much!

    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!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Page 2 opens at the bottom of the list’ is closed to new replies.