# cardlayout setSelectedIndex without animation

pviceic
21

Hi,

Is it possible to use setSelectedItem on the card layout to position on the child, but without animating from the begining ?

The following code works, but everytime I load the next batch of notifications, and set the selected item to the next one, all the cards get animated from the begining..

<cardlayout orient="horizontal" children="@load(vm.notifications)" hflex="1"  vflex="min" selectedIndex="@load(vm.selectedIndex)">..<../>

My goal is to load first batch of 10 notifications, and then when the user clicks next on the last one, I load the next batch of 10 ans so on..

Any help? should I fill a feature request?

Many thanks,
P

delete retag edit
Be the first one to reply this discussion!
[hide preview]