Support » Plugin: TablePress » How to apply fixed header for each table that contains different header titles?

  • Resolved jeyrudra

    (@jeyrudra)


    Hi Tobias,

    My apologies if this question was answered already!

    How to apply fixed header for each table that contains different header titles?

    My tables contain different header titles and I tried the following:
    [table id=1 datatables_fixedheader=top /]
    [table id=2 datatables_fixedheader=top /]
    [table id=3 datatables_fixedheader=top /]

    Table 1 header works fine, but whereas for Table 2 and 3 the moment I scroll down it automatically changes to Table 1 header.

    Requesting to please advise on how to fix this issue.

    Thank you.

    Best regards,

    Jey.

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Your desired behavior should actually be the default. Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Hi Tobias,

    Sorry for the late reply.

    I’m currently testing the Tablepress locally on my PC. I created a testing WP environment and a test page with tables created using Tablepress, please refer to this link http://www.estrie.qc.ca/pages/test/

    I have added the following:
    [table id=1 datatables_fixedheader=top /]
    [table id=2 datatables_fixedheader=top /]
    [table id=3 datatables_fixedheader=top /]

    Thank you.

    Best regards,

    Jey.

    Hi Tobias,

    Please advise.

    Thank you

    Best regards,

    Jey.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the link!

    The problem here most likely is that you show the tables in tabs. This is not properly supported by the DataTables JS library at the moment, from what I know.
    Could you therefore please check if the same wrong behavior happens when you show the tables underneath each other, i.e. not in tabs?

    Regards,
    Tobias

    Hi Tobias.

    I found out I’m having the same issue as Jay, and searching about it got to this thread.

    It’s too bad it doesn’t work with tabs, which was the way I was implementing a price table for a 3 different cases. 🙁
    Maybe I will have to just put all underneath each other and have buttons on top to jump directly to each case.

    Just wanted to confirm that if the tables are just under neath each other, the header works correctly.

    EDIT: just noticed,
    on a table in another tab (not the 1st),
    if we search for a term,
    then the header works correctly

    eg. http://clubecampismobarreiro.pt/wp/precos/
    – tab “acampar” has both tables to test
    – tab “secretaria” has a long table (works correctly if we search for a term)

    • This reply was modified 3 years, 3 months ago by saparreira.
    • This reply was modified 3 years, 3 months ago by saparreira.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi saparreira,

    sorry to hear that you are also affected by this. Yeah, it’s very unfortunate, and I’d love to know a fix for it.

    Good to hear that you found a way to display your tables!

    Best wishes,
    Tobias

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    regarding your edit:
    Yes, that correct. I think a sort should trigger the same.
    The DataTables JS library does a recalculation of the sizes there.

    Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to apply fixed header for each table that contains different header titles?’ is closed to new replies.