• Resolved lamccray

    (@lamccray)


    Hello-

    I an trying to add a tablepress table to another plugin but for some reason the header is not extending to the width of the container. It was able to get it work for a while but since installing the responsive add on i’ve been experiencing this issue. Is there a way for me to fix this? If you need to see an example I will need to send you the page separately as it needs to remain private to the public.

    Thanks!

    https://ww.wp.xz.cn/plugins/tablepress/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This is likely caused by a recent problem with the Horizontal Scrolling feature of the DataTables JS library. I suggest that you uncheck that checkbox on the table’s “Edit” screen.

    As an alternative, you could then use the scroll mode of the Responsive Tables Extension from https://tablepress.org/extensions/responsive-tables/

    Regards,
    Tobias

    Thread Starter lamccray

    (@lamccray)

    Thanks! I tried it with my existing code [table id=1 responsive=scroll datatables_scrolly=500px /] and it did not fix the header (although I changed the table properties). The header would only appear correctly with the following code: [table id=1 responsive=scroll]. Is there a way to also enable horizontal scrolling and not screw up the headers?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? (You can also email it to me, the address is in the main plugin file “tablepress.php”.) Thanks!

    Regards,
    Tobias

    Thread Starter lamccray

    (@lamccray)

    I cannot post a link as it has to remain private. I will send in a separate email.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sounds good! I’ll take a look then.

    Regards,
    Tobias

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the link! I can confirm that the horizontal scrolling is not working when the vertical scrolling is enabled. Unfortunately, I’m not aware of another solution to this, as long as the vertical scrolling is also enabled 🙁
    We might simply have to wait for the Horizontal Scrolling of DataTables to get fixed. (Now after writing this, I’m not sure if we actually already tried that in conjunction with the vertical scrolling… Can you try again after turning off the Responsive Tables Extension and then turning “Horizontal Scrolling” back on?)

    Regards,
    Tobias

    Thread Starter lamccray

    (@lamccray)

    Looks like that did the trick. Thanks!

    Plugin Author Tobias Bäthge

    (@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 lamccray

    (@lamccray)

    Hi Tobias-

    I spoke too soon! The issue occurring again. Can you please refer to the page I provided earlier?

    Thread Starter lamccray

    (@lamccray)

    The only thing I did differently was change the container type.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ah, bummer. From what I can see, that’s now caused by the table being part of a collapsable accordion. This means that the table is not visible initially, meaning that it technically does not have a width. That is however required for the JS script to calculate the column widths.

    I’m afraid that I’m out of ideas here :-/ Sorry.

    Regards,
    Tobias

    Thread Starter lamccray

    (@lamccray)

    Thanks for your help!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sure, you are very welcome! Sorry that I couldn’t offer a solution here.

    Regards,
    Tobias

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

The topic ‘Adding table to a container’ is closed to new replies.