Documentation
Infinite Scroll
SimpleTable provides built-in infinite scroll functionality that automatically loads more data as users scroll near the bottom of the table. This feature is perfect for handling large datasets without overwhelming the user or degrading performance.
Basic Usage
To enable infinite scroll in your table, follow these steps:
- Set a fixed height - Use the
heightprop to create a scrollable container - Implement the callback - Create an
onLoadMorefunction that fetches additional data - Update state - Append new data to your existing rows array
Infinite Scroll Configuration
How It Works
SimpleTable's infinite scroll implementation:
- Scroll Detection - Monitors scroll position within the table container
- Threshold Triggering - Calls
onLoadMorewhen user scrolls near the bottom (typically 100px before the end) - Debouncing - Prevents multiple simultaneous requests by debouncing the scroll event
- Smooth Integration - New data is seamlessly appended to the existing table