Why does clear out when moving back to the first page?

Why does clear out when moving back to the first page?

jwhazeljwhazel Posts: 2Questions: 0Answers: 0
edited September 2013 in DataTables 1.9
I had a clever idea (albeit not too elegant) to create sticky rows by appending the row thats been clicked on to the element in the datatable. This actually works great, the row sits there at the top as expected and you can search around it. However when using pagnination control to go forward and then back to the first page, elements aside from the primary header get dumped back into . You can see this pretty clearly by using chrome inspector. It only occurs when going back to the first page. Is it supposed to do this? Any way that I can keep the rows inside the permanently?

Replies

  • allanallan Posts: 63,381Questions: 1Answers: 10,449 Site admin
    Can you link us to an example showing this please? I'm not sure what would be causing the problem, but it does sound a little outside the realms of what was expected interaction with DataTables!

    Allan
  • jwhazeljwhazel Posts: 2Questions: 0Answers: 0
    I understand this is hacky and not intended use of datatables (or even dom for that matter). It just seems like odd behavior. Of course it could also be intentional, I was just curious.

    http://jsfiddle.net/jwhazel/yvPV4/

    Click on any of the rows in the body. They get colored red and pinned to the top. That way they stay visible while users scroll or page forward. Obviously all I'm doing is appending them to and it works if you scroll, page forward, page back (not to page 1). Whenever you search or page back to 1, it clears the rows out of and puts them back in . I'm curious why it only does this on a search or page back to 1?
This discussion has been closed.