troubles using scrollToIndex method in DataList

I'm having troubles using the scrollToIndex method in DataList, it works fine until the datalist's collection reaches a specific limit of models added. The application I'm making has a FittableRows layout, the rows are: header, mainContent and footer and the mainContent part is an enyo Panels with CollapsingArrangeKind, the Panels are: a menu that shows a bunch of buttons and a datalist wich is a list of the buttons selected by the user. The app is supposed to know when the user taps a button and then add the content of the button to the bottom of the datalist and then scroll to the end of it so the user can see what he just tapped. It works well until the collection reaches a limit when that happens all the mainContent row looses its layout and gets behind the header, it still works adding content to the data list collection and scrolling but damaging the layout, I tried changing the method by calling directly to the scroller and then calling scrollToBottom but it fails in a different way and I consider that the right way to do it would be calling scrollToIndex. I would like to know if I'm right by scrolling to the bottom of my datalist using the scrollToIndex method or if I should do it in another way and if i'm doing it right I would like to know what's the problem.

Comments

  • Hi there, it shouldn't be a problem to call scrollToIndex. Do you have an idea of what this "limit" is where the oddity occurs? Also, how are you adding the content to the end of the list?
  • Hey sorry for not answering before, I solved the problem it wasn't the framework. I put a css value badly and for some reason when the datalist reached over 34 items the window lost it's layout, may be it refreshed something internally? well the point is that the view that had the buttons had it's height set to 100%, at the begining I didn't realize because it was fit to it's container but when the list grew up to 34 items, for some reason it stopped fitting and lost it's layout.
  • Ah gotcha, thanks for the update and glad you solved it!
Sign In or Register to comment.