-3

I'm using Famo.us Angular and Firebase. Everything is going smoothly, except when I add a new item to Firebase, it will only populate at the bottom of the ScrollView list, regardless of what the sorting is. I can add it, appears at the bottom, refresh, it will be at the top.

Is there a way to inject items to the beginning of a ScrollView or SequentialView in Famo.us or Famo.us-Angular?

user2488234
  • 382
  • 4
  • 12

2 Answers2

1

Well in Famo.us (vanilla) you'd have yourViewSequence.splice(0, 0, yourView) to do that. It'd insert yourView at index 0 (first argument) and remove 0 elements while doing that (second argument).

But I do not know about the Angular implementation.

Stephan Bijzitter
  • 4,425
  • 5
  • 24
  • 44
0

Adding fa-index to the fa-view in fa-scroll-view works (when items are in array).

<fa-scroll-view>
    <fa-view ng-repeat="(itemId,item) in items" fa-index="itemId"></fa-view>
</fa-scroll-view> 
user2488234
  • 382
  • 4
  • 12