Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to pass onListboxScroll callback to SelectNext #1603

Merged
merged 1 commit into from
Jul 4, 2024
Merged

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Jul 4, 2024

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.

@acelaya acelaya marked this pull request as ready for review July 4, 2024 14:19
@acelaya acelaya requested a review from robertknight July 4, 2024 14:19
</Library.InfoItem>
<Library.InfoItem label="type">
<code>
() {'=>'} void {'|'} undefined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This callback actually receives an Event, although I'm not sure whether you want to promise that in the API.

@acelaya acelaya merged commit e5d0882 into main Jul 4, 2024
4 checks passed
@acelaya acelaya deleted the listbox-scroll branch July 4, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants