Showing 302 to 45 of 45 entries - showing exceeds entries ?

Showing 302 to 45 of 45 entries - showing exceeds entries ?

mimhofmimhof Posts: 14Questions: 2Answers: 0

Greetings, the pagination Showing number is intermittent greater than actual entries and it has something to do with screen size. I have server site correctly returning "recordsTotal":"45" and "recordsFiltered":"45" The request includes "dt_start":"0" and "dt_length":"333" and even if I modify dt_length before submit, it does has no affect. Some of my options include deferRender: true,destroy: true, scrollY: 800,scrollCollapse: false, serverSide: true.
I have a data set I can send and my options I can send if anyone can help. I also have screen shots showing the phenomenon. Can anyone help?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,174Questions: 26Answers: 4,923

    I haven't done much with server side processing but my understanding is recordsTotal should be the total records in your DB and recordsFiltered how many of those are filtered. Do you only have 45 records?

    You might start with collecting debug info and posting here:
    https://datatables.net/manual/tech-notes/10#DataTables-debugger

    Kevin

  • mimhofmimhof Posts: 14Questions: 2Answers: 0
    edited March 2017

    Hi Kevin, thanks. In this table there are just 45 records, I have others with much more and again it is intermittent. I have the recordsTotal and recordsFiltered correct, something else is driving it as it relates to height somehow. Here is the debugger:
    http://debug.datatables.net/ifinuz

    Just realized it picked up two tables from that site, Table (#squeezesitesdt-datatable) is the one that corresponds with the question here.

    Also, as you can see in that table table summary on the debug page, the Display length is showing 333. I need to know what is calculating that internally. As soon as I resize the screen a little, the pagination numbers correct themselves and if I refresh the datatable, the next call to server has a length of 45. Some value is being set when the table is originally drawn...if I knew what value it is, I could possible add something in the drawCallback to recalc.

  • allanallan Posts: 63,219Questions: 1Answers: 10,416 Site admin
    Answer ✓

    Could you up take to the latest versions of the available software please?

    • DataTables 1.10.13
    • Responsive 2.1.1
    • Scroller 1.4.2

    are the current versions (looks like the debugger has a bug in its DataTables version checking... sigh).

    Thanks,
    Allan

  • mimhofmimhof Posts: 14Questions: 2Answers: 0

    Hi Allan...I updated all three as you suggested and it appears to have taken care of it! Thank you both for the precious advice.

  • mimhofmimhof Posts: 14Questions: 2Answers: 0

    @allan - after updating, I noticed that the bootstrap tabs that I have in responsive columns that must be toggled from control column are not activated which means may mean the content is rendered differently. I'll start figuring that out but if you have any thoughts let me know if you get this. Thanks.

  • allanallan Posts: 63,219Questions: 1Answers: 10,416 Site admin

    Not immediately. If you have a link to the page I can take a look though.

    Allan

  • mimhofmimhof Posts: 14Questions: 2Answers: 0

    Hi..if I use the browse inspector I can see the event is properly attached to a in the tab li. And if change any character on the a link for the tab and make the same change on the tab panel, then the link works..until close, reopen obviously. So there is something in the rendering of the child row affecting tab sets....I'm going to read the responsive docs now.

  • mimhofmimhof Posts: 14Questions: 2Answers: 0

    @allan - There is not an issue. Please disregard, I'm not sure why there was an issue but just fyi, my tabs are assigned ids based on row data and I was appending a prefix so each row had those tabs in hidden child and all unique ids for a targets and divs. With the switch to updated plugin, I traced the issue down to the id creation. I edited it to create a random integer and appended the prefix. That simple step fixed the issue. I first tried to parseInt the unique number in the row object and it did not work either. So, I'm going to assume that even though the row object data was a unique id from the server, the way the extension works with the DOM, it may have been making more than one id and the affect is that the tabs were not working because there was more than one of the same dom id - one that is displayed - and one 'somewhere else' that I would not find unless I tore apart the extension code. Anyways, thanks for being here!

  • allanallan Posts: 63,219Questions: 1Answers: 10,416 Site admin

    Thanks for posting back, good to hear you've got it working now!

    Allan

This discussion has been closed.