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

Merging props documentation #2165

Closed
DarkVen0m opened this issue Jan 4, 2025 · 2 comments
Closed

Merging props documentation #2165

DarkVen0m opened this issue Jan 4, 2025 · 2 comments

Comments

@DarkVen0m
Copy link

Versions:

Inertia 2.0 documentation

Describe the problem:

Documentation on merging props
https://inertiajs.com/merging-props
Does not mention that it only works with partial reloads, which requires either only/except or reset parameter.

if (this.requestParams.isPartial() && pageResponse.component === currentPage.get().component) {

In my opinion it should mention it, as from front-end view everything looks okay without specifying those parameters, mergeProps is present in response as well as prop itself.

Steps to reproduce:

Make any "full"-request with merge props - it won't work.

@HichemTab-tech
Copy link

Hi @DarkVen0m can you please create an issue in inertia documentation GitHub https://github.com/inertiajs/inertiajs.com? Thanks!!.

And by the way, the merge feature has other problems, it isn't working correctly with paging format , u can check the issue with proposed solutions here : #2068

@DarkVen0m
Copy link
Author

Hi @DarkVen0m can you please create an issue in inertia documentation GitHub https://github.com/inertiajs/inertiajs.com? Thanks!!.

And by the way, the merge feature has other problems, it isn't working correctly with paging format , u can check the issue with proposed solutions here : #2068

Thanks, will do.
Yeah, I saw other issues while investigating why props merging doesn't work for me. But in my case it's pagination on my end with simple array/Collection, no nested objects. So specifying "only" parameter did the trick.
The only point was that it's not mentioned in documentation, so as last resort I had to go to inertia source code to understand why exactly it wasn't working.

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

No branches or pull requests

2 participants