Reputation: 125
I saw this DataTable Example explaining custom toolbar elements.
However, when I set:
"dom": '<"toolbar">frtip'
then my toolbar will lose "pagelength" and button,
How can I Custom toolbar elements without loss pagelength and button elements?
Upvotes: 1
Views: 3063
Reputation: 551
You must include l
in toolbar dom. to get pagelength element.
other built-in table control elements in DataTables are:
l
- l
ength changing input control
f
- f
iltering input
t
- The t
able!
i
- Table i
nformation summary
p
- p
agination control
r
- pr
ocessing display element
similarly use can use markup options to add classes and id's
<
and >
- div element
<"class"
and >
- div with a class
<"#id"
and >
- div with an ID
<"#id.class"
and >
- div with an ID and a class
Below is a code snippet i have used in my datatable to positioning different controls :
dom:" <'row'<'col-sm-4'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-2'l><'col-sm-6'i><'col-sm-4'p>>"
Upvotes: 4