Page lenght in button format d'ont display!
Page lenght in button format d'ont display!
klermann
Posts: 277Questions: 67Answers: 1
I'm trying to use the page lenght in button format, but the select display does not appear, when I put it in normal format it appears normally. What can it be?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Please supply more detail. Preferably also show your code.
I'll show you the whole script.
`var editor; // use a global for the submit and return data rendering in the examples
var messageFiles = 'Clipboard - Lista de receitas(entradas)';
var classeBtn = 'btn btn-outline btn-default';
var classeBtnEditor = 'btn btn-info';
var erroValorTxt = '<strong>Erro</strong> ao carregar o valor total das receitas';
var erroDataTxt = '<strong>Erro</strong> ao carregar as datas, atualize a página. [F5]';
var loading = '<div class="loaderData loader loader-circle font-size-60"></div>';
var positionExport = {columns: [0, 1, 2, 3]};
All other buttons are working
The button was restored here, it was one of the configuration files. Which file necessarily takes care of this detail?
The
pageLength
button doesn't have any dependencies other than DataTables core and Buttons core. It is included by default in Buttons core. So as long as you are loadingdataTables.buttons.js
, thepageLength
button will be there.Allan
Klermann,
We do this too and ran into this problem. Thought I'd post the answer in case anyone else has the same issue.
We want to format the buttons, too, and add icons. So, the issue is that the pageLength button is looking for text that reads in the following format:
{'-1': 'Show all rows', _: 'Show %d rows'}
So, we do the following:
Then, we add some additional changes using lengthMenu, which you can actually add an icon to if you'd like.
And viola. It's not ideal. But it does the trick. Just move your icon before everything, or stick to the {'-1': 'Show all rows', _: 'Show %d rows'} format.