angular-datatables icon indicating copy to clipboard operation
angular-datatables copied to clipboard

Using DTOptionsBuilder to Hide Search Box

Open nairys opened this issue 12 years ago • 5 comments

I can't seem to hide the search field using DTOptionsBuilder. I came across .withOption('lengthChange', false) to remove the length change dropdown but I also want to hide the search field. Any clues?

nairys avatar Nov 05 '14 01:11 nairys

There are several way to remove the search box.

  1. Add the option bFilter to false: DTOptionsBuilder.newOptions().withOption('bFilter', false)
  2. Set the dom (remove the f): DTOptionsBuilder.newOptions().withDOM('lrtip)

l-lin avatar Nov 05 '14 08:11 l-lin

Thanks - that solved it!

nairys avatar Nov 05 '14 17:11 nairys

Also, one quick question - is the bFilter option mentioned somewhere in the docs? I can't seem to find any trace of it so I'm wondering whether I'm looking in the wrong place.

nairys avatar Nov 05 '14 19:11 nairys

It's in the legacy doc and it's still usable in v1.10+. Don't know if it's going to disappear later...

l-lin avatar Nov 05 '14 19:11 l-lin

Appreciate the tip!

nairys avatar Nov 05 '14 19:11 nairys