I have a timeline scheduler implemented along with pagination control at the bottom. When the page is changed, I need to re-feed the scheduler with a new page data. I’m wrapping the scheduler into a Polymer component, for easier communication with parent page.
What I was able to do is to feed each page with its set of records, both the left Y axis and values per dates. So, when I hit the page, my data are refreshed accordingly to page number. No issues here.
But I also need to add my custom logic on a section click. While on the first page the var index = scheduler.getActionData(e).section is evaluated correctly and index is right, on the other pages looks like the getActionData(e) returns data “based” on the amount of records on the previous pages.
Example: imagine that I have 10 records per page. When I click first record on the first page, the index will be 1. When I change the page to second and again click the first record, the index is 11. On the third it will be (10*2) + 1 = 21 etc. Thus I can never get the right clicked row index on the page number more than 1.
Is there any function that I can call staying on the page to fully reload the scheduler? These didn’t help:
scheduler.clearAll();
scheduler.setCurrentView(null, “timeline”);