Im using "sDom": 'Rfrtlip' but i can't customize it
Im using "sDom": 'Rfrtlip' but i can't customize it
Pepayu
Posts: 4Questions: 2Answers: 0
My js is this:
new DataTable('#productTable', {
layout: {
topStart: {
buttons: ['pageLength']
}
},
stateSave: true,
"sDom": 'Rfrtlip',
bFilter: false
});
But it is not saving the button-esque style for the page entries, when i tried removing the "sDom": 'Rfrtlip', it shows nice but they are 2 at the top.
I just want a button style at the bottom.
Answers
Fix this by:
and hiding the dt-length
The
layout
docs show how to remove unwanted default options. See the default options section. Basically usetopStart: null,
to remove the page length option instead of using CSS. Either way works but it might be more clear when looking at the code later if you usetopStart: null,
instead of the CSS.Also, as you figured out, the
dom
andlayout
options do the same thing so only one of them will work. Not sure without test which will be applied in the case of both being configured.Kevin