Is there a way to update or append items to RowList content while keeping focus on the current selected/highlighted row item ?
Each row in the rowList is an independent list that is loaded asynchronously. The rowList is updated via an observeField method (Fig 1). The problem is that when the new content is added to the rowlist, the focus resets back to the first item in the first row. I want to keep the focus on whatever row item the user has navigated to while the rest of the rows are loading asynchronously.
I think the problem might be that I set the RowList.content to a new updated masterList each time (Fig 2).
I change the code to append a new row item, it also causes the focus to reset to the first row.
Fig 1.) m.ApiMixedListTask.observeField("responseObject", "onMixedListResponse") Fig 2.) function onMixedListResponse() masterList.push(newRowItems) m.top.gridContent = masterList end function
Fig 3.) RowList: https://sdkdocs.roku.com/display/sdkdoc/RowList
<RowList
id="RowList"
focusBitmapUri="pkg:/images/focus_grid.9.png"
translation="[-60, 372]"
itemSize="[1327, 218]"
numRows="3"
itemSpacing="[13, 0]"
focusXOffset="[147]"
rowFocusAnimationStyle="fixedFocusWrap"
rowItemSize="[[262, 147]]"
rowItemSpacing="[[16.5, 3]]"
showRowLabel="true"
showRowCounter="true"
rowLabelOffset="[[147, 20]]"
/>
Although this would make for a bad user experience, if keeping focus is not possible , I might just have to block user interaction while the content loads.