onNeedsmore not firing on grid element

In another part of my app, I have a shelf element with the onNeedsmore event handler that gets fired when I scroll toward the end of the shelf. According to the documentation, similar functionality shoudl be available to the grid element. However that event is never firing. I have tried adding an event listender to each element in the grid heirarchy )parents and childern) and that event is never firing.


Is this a problem in the documentation? or a bug in TVMLKit?

Replies

I'm having the same issue. No "needsmore" event is fired on grid elements. Did you file a bug report about this?

If you're using the stackTemplate, add the eventListener to the template itself - not the grid element.


stackTemplate.addEventListener("needsmore", (event) => {
     console.log("needsmore", event)
})

I am using a searchTemplate


searchTemplate > collectionList > grid > section > lockup


None of those elements have a `needsmore` event that is fired on them.

Filed a bug: https://bugreport.apple.com/web/?problemID=42245141

Please include a sample project that reproduces this

I am seeing the same thing, if I use stackTemplate the needs more event fires, if I use searchTemplate it does not. THe docs for searchField say its contained in stackTemplate but I cant seem to find where to put it to make it show up.


https://developer.apple.com/documentation/tvml/multimedia_elements/searchfield


I think for now I'm going to have to resort to just letting search return a lot of results and a TODO 🙂.


Also when I click on that bug link above, it says it doesnt exist. Do we need to file another one?