Hiding the searchbox

Hiding the searchbox

twintertwinter Posts: 1Questions: 1Answers: 0

Hello
I would like to remove the default searchbox and use mine
I know there is a way to do it with layout but I didn't understand how.
and by the way, when I change the searchable to false, although it hides the searchbox but the search api doesn't work either.
Thank you

Answers

  • kthorngrenkthorngren Posts: 21,459Questions: 26Answers: 4,975

    I know there is a way to do it with layout but I didn't understand how.

    Take a look at the defaults section of the layout option. The default layout for search is topEnd: 'search'. The docs show to set it to topEnd: null to remove the search input.

    by the way, when I change the searchable to false, although it hides the searchbox but the search api doesn't work either.

    That is expected behavior. The searching docs state this:

    Note that if you wish to use the search abilities of DataTables through the API this option must remain true. To remove the search input control use the layout option.

    Kevin

  • talwintertalwinter Posts: 1Questions: 0Answers: 0

    I missed that note:
    Note that if you wish to use the search abilities of DataTables through the API this option must remain true. To remove the search input control use the layout option.

    Thanks mate.

Sign In or Register to comment.