Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Timeline setlanes causes server refresh, why?

    Hi guys,

    as you might have noticed, i'm making some updates to our Timeline code :) So another thing:

    I noticed on the server that the Timeline had started fetching the data twice again (there was an old issue you fixed a while back), so i looked in to it.

    We had autoFetchData() set to true, and had (as per the earlier issue) sure to set the date interval early, then the datasource and then setAutofetch.

    I dug around, and found that the issue is setLanes. When you do that call, it seems that the data is re-fetch from the server, even if it has just been fetched through autofetch. The criteria and date interval is exactly the same in the two fetches.

    Is there any way to prevent this?


    #2
    We've replaced the data-refresh behavior in setLanes(), which isn't necessary, with a call to refreshEvents(), which just updates the UI according to the new lanes and the current set of data.

    You can test out the fix in builds of 12.x, dated March 28 or later.

    Note that, if you're calling setLanes() at runtime, in order to filter visible lanes or similar, there's a shouldShowLane() API that could simplify that sort of mechanism.

    Comment


      #3
      Sweet, thx. Will try as soon as i can get my hands on it.

      Comment

      Working...
      X