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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The reason for this is the usage of combined cells in the table head row. You have connected the second and third cell there with #colspan#.
    Unfortunately, the DataTables JS library does not work with tables that have this.
    Just remove that #colspan# and leave the third column empty. The features will work after that.

    Regards,
    Tobias

    Thread Starter heatherpeters

    (@heatherpeters)

    Thank you so much for your reply!! You were correct, I made the change as you suggested and now it works perfectly. Thank you!!!!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome Great to hear that this helped! ??

    Best wishes,
    Tobias

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

    I am having the same issue but I don’t think I am using combined cells.

    https://mcsinserts.com/trucking-log/

    I’m curious if my theme is overriding the css for these tables.

    Please help.

    Jason

    Please disregard… I figured it out.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    great! Do you mind sharing what the solution was? Maybe that’s helpful for others as well… Thanks!

    Regards,
    Tobias

    lol… To be honest, I have no idea! I didn’t reset cache or anything so I’m not sure. I did, however, import a bunch of data and it then the extra pieces worked.

    a mystery to me.

    GREAT JOB ON THE PLUGIN! I really like the “Plugin Options” section!

    Jason

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Jason,

    ok ?? Interesting. Might have been a small temporary glitch. Good to hear that it disappeared!

    Best wishes,
    Tobias

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

    Tobias,

    I’m trying to use jQuery to hide the search box on some tables. This CSS should work, but it doesn’t:

    jQuery(document).ready(function($){
    $(‘.dataTables_filter’).css(‘display’, ‘none’);

    I’ve tried previously to do some CSS tweaks to the search box via jQuery without success. It seems like its loading that feature asynchronously or something because it doesn’t respond and that makes me think its not in the DOM when the ready() function fires.

    Can you explain or offer help?

    Thanks,
    Brian

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    First, this is actually not CSS, but JS (JavaScript) code! You can therefore not place it into the “Custom CSS” textarea, for example.

    Now, I’m not yet sure what you are trying to do here. What modifications do you want to apply to the search field? Why do you want to use jQuery/JavaScript instead of hiding it with some simple CSS?

    (And yes, that JS probably fails because of timing issues, i.e. it’s likely executed before the table functions are initialized.)

    Regards,
    Tobias

    I realize its JS code! Its in a script that gets executed properly after the page loads, however it doesn’t effect the table. I have other tweaks I do in a similar manner to hide columns and such that do work properly. It seems to be with this search addon somehow.

    Therefore, I’m looking to understand if there’s a timing issue I can work around by hooking to another event that gets executed when the table functions are done initializing.

    Thanks,
    Brian

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    having it execute “after the page loads” is not enough. It has to run after the table initialization code is run, i.e. you’ll have to include it at a very late time on the page (after the dataTable() call in the footer).
    Another way would be to use the fnInitComplete callback in DataTables, see https://datatables.net/usage/callbacks#fnInitComplete
    With that, you could add something like

    "fnInitComplete": your_function

    to the “Custom Commands” field on the “Edit” screen of the table.
    your_function would be the JS function name that you want to call.

    But still, I’m not yet understanding why you are using JS to hide the search field or color rows. That’s possible much easier and quicker with plain CSS. Or was this more of a toy example and you are actually trying to implement more complex things?

    Regards,
    Tobias

    Tobias,

    I got this idea to work nicely.

    I have four fairly large tables I use throughout the site for a variety of displays. Sometimes I use the filter option to show only a few rows, and sometimes I show lots of rows where I need search. I don’t want to maintain multiple tables for each purpose, so I’d rather just tweak the display characteristics on a given page for what I want.

    This idea works good, thanks again.

    Brian

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, ok. I guess that makes sense then. Good to hear that it’s working! ??

    Best wishes,
    Tobias

    Hi, please have a look herE:
    https://www.studio-88.co.za/index/stores/

    None of the added features, (search, sort etc) are working.

    Please let me know what you think!!! Thanks in advance!

Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘Search box is not showing up with table?’ is closed to new replies.