• Resolved guyincognit0

    (@guyincognit0)


    I am looking to create a table with the collapse function but only on specific columns, the rest I would like to be able to scroll through horizontally with an overflow.

    Thanks in advance for any help on this!

    • This topic was modified 3 years, 8 months ago by guyincognit0.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I see what you mean, but I don’t think that this will be possible. From everything I know, the external JavaScript library that TablePress uses, does not support both these things at the same time.
    You could however try it, by using the collapse mode of the Responsive Tables Extension from https://tablepress.org/extensions/responsive-tables/ as described, and having “Horizontal Scrolling” checkbox turned on on the table’s “Edit” screen.
    Then, you could turn off collapsing for certain columns by adding something like this to the “Custom Commands” textfield on the table’s “Edit” screen:

    "columnDefs": [ { "className": "all", "targets": [ 3, 4 ] } ]
    

    This example would turn collapsing off for columns 4 and 5 of the table (counting starts with 0 in the code).

    Regards,
    Tobias

    Thread Starter guyincognit0

    (@guyincognit0)

    Thanks Tobias that works perfectly, I was banging my head for far too long on this!

    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!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Collapse Extension with overflow’ is closed to new replies.