[ 1 post ]

Michael Osipov

  • Username: Michael-O
  • Joined: Fri Mar 19, 2010 2:01 pm
  • Posts: 3
  • GitHub: michael-o
  • Gists: michael-o
  • Offline
  • Profile

YUI DataTable with dynamic data not jumping to spec. page

Post Posted: Mon Jul 09, 2012 9:28 am
+0-
Hi,

I need to implement a specific use case with DataTable and external
paging and sorting (dynamic data). I need to trigger the pagination
to jump from page n to page n-k or n+k with a chunk size of 25 elements.

I use the onDataReturnReplaceRows in my success callback.

Now, so far I had success which implementing such hook and have
successfully overridden the handleDataReturnPayload method to update state.

When I call my funtion the page gets updated but the data table is set empty.
I have debugged the onDataReturnReplaceRows method and assume that the
ordering of calls is just incorrect.

As you can see here on line 15
the previous index is retrieved where the new dynamic data is set with setRecords
but I can update the approriate state in line 27 only. So the rendering
retrieves non-exisiting data from the record set.
The state has to be updated first.

Can this be considered as a bug?

Thanks,

Michael
  [ 1 post ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum