シェバイクン
シェバイクン

Reputation: 125

DataTables how to Custom toolbar elements without loss pagelength,button elements

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

Answers (1)

Sreeraj_ms
Sreeraj_ms

Reputation: 551

You must include l in toolbar dom. to get pagelength element.

other built-in table control elements in DataTables are:

l - length changing input control

f - filtering input

t - The table!

i - Table information summary

p - pagination control

r - processing 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

Related Questions