[docs][autocomplete] Add demo with Tanstack Query useInfiniteQuery by mj12albert · Pull Request #48356 · mui/material-ui (original) (raw)
Related to #38714
Worth adding to show that a robust integration is possible without any API changes on our side.
Codex explanation of why @tanstack/react-virtual instead of react-window:
TanStack Virtual is better for the infinite-loading demo because it exposes the rendered range directly, which lets us prefetch the next page based on virtual items instead of fragile scroll-position math. react-window is still very fast for fixed in-memory lists, but TanStack Virtual has the better DX and control surface for async pagination + keyboard scroll sync.
- I have followed (at least) the PR section of the contributing guide.