Unity3dAzure / AppServicesDemo

Azure App Services demos for Unity
https://www.deadlyfingers.net/tutorial/azure-app-services-for-unity3d
MIT License
27 stars 13 forks source link

Infinite scrolling #29

Closed deadlyfingers closed 8 years ago

deadlyfingers commented 8 years ago

The Read results are limited to 50 results by default. But demo would be nicer with infinite scrolling buffer to load in next page of results into the table view.

deadlyfingers commented 8 years ago

Unity TSTableView has properties scrollY and scrollableHeight that will be used when calculating the infinite scroll buffer. But there are a couple of things:

ClearAllRows();
if (this.isEmpty) {
  // reset content size when empty
  var rect = m_scrollRect.content.GetComponent<RectTransform> ();
  rect.localPosition = Vector2.zero;
  rect.sizeDelta = Vector2.zero;
  m_requiresReload = false;
  return;
}

Also submitted as PR - https://bitbucket.org/tacticsoft/tstableview/pull-requests/3/reloaddata-method-should-reset-content/diff