Open PedroAugustoRamalhoDuarte opened 1 month ago
Merge data and params props: This PR introduces a more flexible API that merges the data and params props. Now, you can pass both in a single configuration like this:
data
params
<WhenVisible fallback="Loading..." data={["todos", "pagy"]} params={{ data: { teste: true, page: pagy.page + 1, }, preserveUrl: true, }} />
Make children optional in WhenVisible: Which enhances use cases like InfiniteScroll. Here’s an example:
WhenVisible
InfiniteScroll
<WhenVisible fallback="Loading..." params={{ data: { page: pagy.page + 1, }, only: ["todos", "pagy"], preserveUrl: true, }} />
This PR fixes #2025
Enhancements
Merge
data
andparams
props:This PR introduces a more flexible API that merges the
data
andparams
props. Now, you can pass both in a single configuration like this:Make children optional in
WhenVisible
:Which enhances use cases like
InfiniteScroll
. Here’s an example: