mirror of
https://github.com/supabase/supabase.git
synced 2026-06-22 22:15:59 +08:00
fixes `UseInfiniteQuery` so it recreates when query inputs change the previous prop change check compared values to themselves so the hook could keep stale paginated state after table columns page size or trailing query changed - closes https://github.com/supabase/supabase/issues/37750 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an optional trailingQueryKey prop to the infinite-query hook to better control when its internal store is refreshed. * **Bug Fixes** * Pagination now reliably uses the latest trailing query and avoids inconsistent state during initial load and subsequent pages. * **Refactor** * Reworked store lifecycle and initialization for the infinite-query hook to reduce unnecessary recreations, streamline startup, and improve performance and stability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->