Support » Plugin: TablePress » datatables_columnfilterwidgets oddity

  • Resolved palmerct

    (@palmerct)


    Hi Tobias! Long time…hope you’re doing well.

    I’m trying to use the datatables_columnfilterwidgets extension to give viewers the ability to select one CATEGORY from that first column in a table of Presetations. I’m using this syntax:

    [table id=42 datatables_columnfilterwidgets=true datatables_columnfilterwidgets_exclude_columns=2,3,4,5 /]

    and it looks like it is displaying properly. But after choosing a CATEGORY from the dropdown, the name of the selected category shows up below the dropdown box but the list is not filtered — it shows everything. Any ideas???

    Thanks!
    -chuck

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter palmerct

    (@palmerct)

    Found it!! Sorry, I didn’t realize that the Search feature had to be turned on for filtering to work. That fixed it-:)

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Yes, the search has to be turned on for this. You can however hide the search field with CSS, if you don’t need it. For that, just add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    #tablepress-123_filter {
      display: none;
    }

    where 123 is the table ID.

    Regards,
    Tobias

    Thread Starter palmerct

    (@palmerct)

    Thanks, Tobias. Yes, I found that same css in one of your support replies regarding Search having to be turned on. I also ran across one that gave the code for changing the width of the border around download box. I’m still trying to learn CSS so they were both very helpful. I can copy-and-paste; just can’t figure out where to find the specific code required!

    Speaking of which…a couple of questions. I was wondering:
    1) why did the command to hide the Search box start with a “#tablepress” rather than a “.tablepress” like the others in the Plugin Options?

    2) it looks like that #tablepress command is global and turns off search for all tables. Is there a way to make it apply to just a specific table or tables?

    3) Is it possible to hide the column that is being filtered? In my specific case, CATEGORY is column #1 but if I check the box at the bottom of that column and select HIDE, that then changes the dropdown box to filtering on the next column. That’s just a nit but I do think it would look nicer if that redundant info is not displayed.

    4) Lastly, and so I don’t have to nag you with more cosmetic questions-;)….
    where should I look to find these various css commands that I would put in the Plugin Options section?

    As always, thanks for all you do — GREAT JOB!!
    -chuck

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    regarding your questions:
    1) These elements are added by the external DataTables JS library, which only assigns HTML IDs (those are targetted with #) to the elements, but not HTML classes.

    2) No, that #tablepress-123_... would only hide the element for that table ID.

    3) Yes, you can hide that column – but not via that Hide button (this would prevent the data from being sent to the browser). Instead, you would hide it with CSS code:

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

    4) For some examples and details, please see the TablePress FAQ at https://tablepress.org/faq/ and the Documentation at https://tablepress.org/documentation/

    Regards,
    Tobias

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘datatables_columnfilterwidgets oddity’ is closed to new replies.