Support » Plugin: TablePress » Default text for empty table

  • Resolved eehmke

    (@eehmke)


    I created some tables that are filtered by some category fields. This works perfect, thank you for your work! It would be nice to display a default text in case the filter results in an empty table. Is there a simple solution?

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Just to be sure, which filtering are you referring to here? Can you maybe post a link to the page with the table where this happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter eehmke

    (@eehmke)

    Hello Tobias,
    my table is invoked by this shortcut:
    [table id=1 hide_columns="1" alternating_row_colors="true" filter="cat_ul" /]
    The table has a first column that contains categories like “cat_ul”. There are some categories for future reference that have no matching table entry. When this filter is used, just no table entry is rendered. This is correct, but I would like to have a text like “This category has no values” displayed in this case.
    Cheers, Eggert

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the explanation and the example. I see what you mean. Unfortunately, I’ll have to disappoint you here, though. For the filter Shortcode parameter, I can’t think of a way to add such a “nothing found” message 🙁 Sorry.

    Regards,
    Tobias

    Thread Starter eehmke

    (@eehmke)

    Hello,

    thanks for the fast answer. Could such message not be attached to the table itself, and set up in the configuration section?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I can’t really think of a way to do that. The row filtering internally uses the “hide_rows” functionality. Thus, when the (filtered) table is rendered, no information that this actually came from filtering is taken into account.

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Default text for empty table’ is closed to new replies.