• Resolved Tim Burkart

    (@bigmoxy)


    Hi,

    I have marked two rows to be hidden however they are still appearing when the table is displayed. The rows are company name is NapaCabs and company name is EcoCat. I am also using hide columns but that works fine. Is there a conflict? Or is it something else?

    Thank you!

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Do these rows have a red background color on the table’s “Edit” screen? And what’s the full Shortcode that you are using to embed the table on this page?

    Regards,
    Tobias

    Thread Starter Tim Burkart

    (@bigmoxy)

    Hi Tobias,

    Thank you for your quick response! Yes, the two rows do have a red background on the Edit screen.

    Here is the shortcode on the page:

    [table id=2 responsive=collapse row_order=sort row_order_sort_column=H row_order_sort_direction=ASC /]

    Here are the custom commands I am using:

    "columnDefs": [ { "className": "none", "targets": [ 3, 4, 5, 6 ] }, { "orderable": false, "targets": [ 0 ] } ]

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for that! From the Shortcode, I can see that you are using the TablePress Table Row Order Extension here as well. And that’s where this problem comes from: The sorting is done before the hidden rows are removed (still by row number), so essentially two other rows will have been removed here.

    To make this work here, you will need to do a small code change. In the file /wp-content/plugins/tablepress-table-row-order/tablepress-table-row-order.php on your server, please change line 55 from

    add_filter( 'tablepress_table_evaluate_data', array( __CLASS__, 'tablepress_table_render_data' ), 10, 3 );
    

    to

    add_filter( 'tablepress_table_render_data', array( __CLASS__, 'row_order_after_evaluate_processing' ), 10, 3 );
    

    Regards,
    Tobias

    Thread Starter Tim Burkart

    (@bigmoxy)

    Hi Tobias,

    Unfortunately my line 55 does not match yours. This is my line 55:

    add_filter( 'tablepress_table_evaluate_data', array( __CLASS__, 'row_order_after_evaluate_processing' ), 10, 3 );

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ah, my bad. I edited something in the wrong line. Your line 55 is correct. Please change that to

    add_filter( 'tablepress_table_render_data', array( __CLASS__, 'row_order_after_evaluate_processing' ), 10, 3 );
    

    (i.e. evaluate needs to be changed to render in the first part).

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide table row isn’t working’ is closed to new replies.