• Resolved stl99

    (@stl99)


    Hi there,

    I noticed two issues when using the column filter extension (TablePress 2.0 beta).

    In the filter select values are not sorted properly:

    0
    1
    1.000
    10.000
    100
    100.000
    2.500
    25
    3.000
    5.000
    50
    500

    Also, it’s not possible to filter by hidden columns.

    Any ideas how to solve this?

    Cheers,
    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.

    Just to be sure: Are you referring to the ColumnFilterWidgets Extension (with dropdowns)? That does indeed sort these values as strings — unfortunately, I’m not aware of a direct way to change that ??

    As for hidden columns: What method for hiding are you using? Are you hiding the columns on the “Edit” screen, so that they have a red background? Those columns will not be sent to the browser at all, so you’d have to use hiding via CSS code instead. For example, add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-id-123 .column-4 {
      display: none;
    }

    Regards,
    Tobias

    Thread Starter stl99

    (@stl99)

    Hi,

    Thanks for the CSS hint.

    Regarding the filters: Yes, I’m referring to the the ColumnFilterWidgets extension. Will TablePress work with custom DataTables JS code? I’ll try to find a solution in their forums then. In case there’s a standardized way: Do you have an (unrelated) example of how to add multiple, more complex custom commands in the table settings?

    Cheers,
    Thomas

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for the clarification! Yes, TablePress will work fine with custom DataTables code. It would either have to be modified in the corresponding JS files (e.g. of the Extension), or added (depending on what is modified) to the “Custom Commands” text field on the table’s “Edit” screen. These “Custom Commands” will be inserted into the DataTables initialization call. Multiple ones can usually be combined with a comma, unless they change the same settings.

    Regards,
    Tobias

    Thread Starter stl99

    (@stl99)

    I contacted the developer of the ColumnFilterWidgets plugin. He was surprised it’s still working, it seems the plugin ist not a priority for him anymore an.

    Maybe you could consider at some point integrating DataTables “Individual column searching” instead: https://datatables.net/examples/api/multi_filter_select.html?

    Best,
    Thomas

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for checking back on this! I guess he used solid APIs which is why this is still working ??

    As for the Multi Filter Select: You can actually apply this now already! Just put everything from line 3 to 24 (i.e. the full initComplete function) into the “Custom Commands” text field on the “Edit” screen of your table. Make sure that your table has am empty row at the end and that the “Table Foot” checkbox is checked.

    Regards,
    Tobias

    Thread Starter stl99

    (@stl99)

    Right, it already works – thanks!

    Cheers,
    Thomas

    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 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Column filter value sorting & hidden columns’ is closed to new replies.