Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Narek-T

    (@narek-t)

    I forgot to say, I use options DataTables JavaScript and horizontal scroll.
    I see in browser inspector, width of dataTables_scrollHeadInner equal to 0px until I resize browser..

    Thread Starter Narek-T

    (@narek-t)

    Ok, I solved that problem.. It is not the fault of the plugin. jQuery cant calculate width for hidden blocks.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Yes, this is indeed related to exactly that issue. When the table is hidden initially, it’s width can not be calculated.

    One workaround for the horizontal scrolling could be to use the TablePress Responsive Tables Extension from https://tablepress.org/extensions/responsive-tables/ which also has a horizontal scrolling mode.

    Regards,
    Tobias

    Hi Tobias,

    Tablepress is really a great solution… they really helped me to solve many issues.
    One final problem is to combine the Template Tag Function “tablepress_print_table” with the Responsive Tables Extension.

    How can I use the “mode” (flip,scroll etc.) of that extension when using the Template Tag Function “tablepress_print_table” in php? (if this is a simple or stupid question, I am sorry for that – I am for sure not a wizard ;-))

    Thanks for your help and advice!

    Michael

    solved it with using do_shortcode:

    original entry in php:
    tablepress_print_table( “id=$table_press_calc” );

    new entry in php:
    echo do_shortcode( ‘[table id=”‘.$table_press_calc.'” responsive=scroll /]’ );

    If there is still any better solution, please let me know.

    Thanks,

    Michael

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    There’s indeed an easier way using the Template Tag function here, which saves some regexp calls in do_shortcode(). You could use:

    tablepress_print_table( array(
      'id' => $table_press_calc,
      'responsive' => true,
    ) );

    Regards,
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Tablepress plugin in modal’ is closed to new replies.