• Resolved stl99

    (@stl99)


    Hi there,

    I have TablePress 2.0 Beta 1 installed and I’m trying to use custom sorting and custom filter dropdowns (DataTables ColumnFilterWidgets) for a table – unfortunately, together these functions don’t seem to work.

    In the table settings a have added as custom parameter "columnDefs": [ { "orderable": false, "targets": [ 0,1,4,5 ] } ].

    As configuration parameters in the post editor for the TablePress block I have added [datatables_columnfilterwidgets=true datatables_columnfilterwidgets_exclude_columns=0,1,4,5 ].

    Is this the wrong way to achieve this? When I remove one of the customizations the other does work…

    Best,
    Thomas

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.
    Also, thanks for testing TablePress 2.0-beta! ??

    To make this work, please remove the [ and ] around the Configuration parameters. These were only needed in the old Shortcode format, but are no longer needed in these configuration parameters.

    Regards,
    Tobias

    Thread Starter stl99

    (@stl99)

    Hi,

    Thanks, that works! I noticed though: When using the table settings, the first column needs to be addressed as “0”. The block settings on the other hand require “1” for the first column.

    BTW: I found the ColumnFilterWidgets plugin feature only after a Google search. It seems not all available extensions are listed on your website. For me, ColumnFilterWidgets is what will make me use TablePress…

    Will TablePress 2.0 have a premium plan or do you still prefer donations?

    Cheers,
    Thomas

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    great! Good to hear that this worked!

    You are right, in the “Custom Commands”, counting the columns starts with 0, as these are directly used in JavaScript code.
    In the configuration parameters, these start with 1, as an intermediate step still follows.

    And yes, ColumnFilterWidgets is currently not listed in the Extensions list, as I’m currently working on making it better and directly integrating it into TablePress, for — you guessed it — a Premium version ?? I hope to be able to finish this later this summer!

    Regards,
    Tobias

    Thread Starter stl99

    (@stl99)

    Great, will order the premium version then – please keep us up to date!

    One more thing: I noticed that with sorting disabled for some columns the cells with sorting enabled have slightly less height. position:relative seems to be responsible for that. I have “fixed” it with adding the CSS sorting icon to all columns and hiding it via assigning the icon the same color as the cell background. Unfortunately I can’t provide a link to an example, but it’s definitely position:relative that’s causing this. It’s a small problem, just wanted to inform you about it…

    Cheers,
    Thomas

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    cool! ?? That’s very nice of you! It should be ready soon, and you will of course be seeing an update notice on your site!

    As for that position: relative; problem: I can’t seem to reproduce this. I have turned off sorting for the first two columns on https://tablepress.org/demo/ and can’t see any problems with the cell height?

    Regards,
    Tobias

    Thread Starter stl99

    (@stl99)

    Hi,

    Then it’s probably a theme specific issue… Anyway, I fixed it for me!

    Cheers,
    Thomas

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, that’s possible then. Good to hear that you found a solution for your site!

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom sorting & filter dropdowns not working together’ is closed to new replies.