hide data until searched

hide data until searched

54696d2054696d20 Posts: 75Questions: 18Answers: 0

Hey,

I'm trying to see if this is possible. I'm looking to provide the data table information, but don't show the user until they selected a filter option and then just show that data filtered.

http://live.datatables.net/tobabovo/1

As you can see I have a filter tab. In my current setup. I'll have a filter section where the user can select what they want to see. I'd be using something like https://datatables.net/examples/api/regex.html, but I'll have checkboxes

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    Answer ✓

    You can hide the table with jQuery's hide() method. I would try it inside initComplete for each table you want hidden, for example:

          initComplete: function () {
            $('#studentsTab').hide();
          }
    

    Then show() the table once you are ready to search.

    Not sure if that is answering your questions.

    Kevin

  • 54696d2054696d20 Posts: 75Questions: 18Answers: 0

    Thanks @kthorngren

    I know how to do it with js, but just wanted to make sure I wasn't missing something that you had already built.

This discussion has been closed.