hypothesis / frontend-shared

UI components and styles for Hypothesis front-end applications
https://patterns.hypothes.is
5 stars 2 forks source link

Allow to pass onListboxScroll callback to SelectNext #1603

Closed acelaya closed 1 month ago

acelaya commented 1 month ago

This PR adds a new onListboxScroll prop to SelectNext, which is basically a callback that gets propagated to the listbox onScroll.

As part of the LMS dashboard, we'll use this to dynamically update the options in the list when loading long lists in chunks.

I considered making this smarter, but then I thought there's too many possible requirements that could come from this, and finally decided to make it a dumb callback and let consumers implement the whole logic for now.