kelweb87
Visitor

RowList stacking components?

I'm running into a strange issue with my RowList component.

I have a RowList on a page with 1 row and multiple items within that row. Each item is made from a custom component (a simple group including a poster and a label). When each item is focussed i add a border to the bottom of the item and when selected it plays a video. This all works as expected, the problem is when i close the video and attempt to focus on the RowList again, it looks like all the items for the row have been added again and are stacked on top of the existing items. The previously selected item retains it's 'focused' state and shows the border even when scrolling through the other items in the row.

No re-fetching of the data is occurring and i even observed the content node of the RowList using the ObserveField method and verified that nothing was changing. The only thing that changed was the visibility being set from true to false and vice versa.

Anyone ever came across this or have any idea how to resolve it?
Tags (1)
0 Kudos
2 REPLIES 2
joetesta
Roku Guru

Re: RowList stacking components?

Try resetting the rowlist by reassigning the same content prior to making it visible again.
aspiring
Tags (1)
0 Kudos
destruk
Streaming Star

Re: RowList stacking components?

When you use ObserveField - make sure you are not telling it to observefield more than once.  Remember to unobservefield if you need to tell it to observefield again or it will fire each time in succession incrementing.
in other words if you have a routine which sets observefield, each time that routine runs it sets up an extra callback to it.  The second time it will execute the callback twice, the third time it will execute it three times - it gets real messy.  So either set it a single time in Init, or if you are manually setting it be sure to unset it/unobservefield when it executes.
Without seeing the code involved I'm only guessing, but perhaps when the focus changes to the videoplayer you could unobserve the field that redraws the overlays, and when focus switches back to the rowlist observe the field again.
Tags (1)
0 Kudos
Community is Temporarily in Read-Only Mode!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

Thanks for your patience — we’re excited to share what’s next!