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

[Feature]: Can we have a paginated/Infinite scrolling ComboBox. #31261

Closed
1 task done
jbujula opened this issue May 2, 2024 · 2 comments
Closed
1 task done

[Feature]: Can we have a paginated/Infinite scrolling ComboBox. #31261

jbujula opened this issue May 2, 2024 · 2 comments

Comments

@jbujula
Copy link

jbujula commented May 2, 2024

Library

React Components / v9 (@fluentui/react-components)

Describe the feature that you would like added

When you do a Odata call and if the response contains more than 5000 records it usually gives a Odata.nextlink which is a URL that is used to fetch next set of items. So, in order to append those results to the dropdown we need a callback which triggers upon scrolling to bottom.

Have you discussed this feature with our team

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Priority

Normal

@Mitch-At-Work
Copy link
Contributor

Hi there, as the combo box is composable the code to enable this would best be introduced app logic side.

Recommendation would be for users to render a non-interactive loading indicator as the final option in the combo box, attached to an IntersectionObserver callback (https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver) - this will notify users when the user has scrolled the loading indicator into view and give users full control over the visibility/refresh logic.

We also implement a Virtualized example for large lists to enable performant loading of large numbers of items: https://react.fluentui.dev/?path=/docs/components-combobox--default#virtualizer

@joeyfigaro
Copy link

For anyone else stumbling here, the current working link for the virtualizer example Mitch mentioned seems to be here: https://react.fluentui.dev/?path=/docs/components-combobox--docs#virtualizer

It doesn't currently seem to have working search, though. Searching for numbers in the (virtualized) list doesn't focus any of the options or scroll to them. Hitting enter, clicking, and hitting tab don't select option values either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants