Hide table if search is unsuccessful.

Hide table if search is unsuccessful.

fernandodenardinfernandodenardin Posts: 1Questions: 0Answers: 0

I have a page with 3 tables and a search field that works for these 3 tables. I need to hide the tables that have no results and only show the ones they have. Can someone help me?

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @fernandodenardin ,

    On the draw, you could check the table length (either with jQuery or the API's page.info()), and just hide the table wrapper element if it's empty.

    Cheers,

    Colin

This discussion has been closed.