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

Don't evaluate lazy properties when not specified by partial reload #688

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

joetannenbaum
Copy link
Contributor

This PR fixes a situation where properties such as this:

inertia('Users/Index', [
    'users' => fn() => Users::all(),
]);

were being evaluated on partial reloads even when users was not specified by X-Inertia-Partial-Data.

@joetannenbaum
Copy link
Contributor Author

Fixes inertiajs/inertia#2094

@RobertBoes
Copy link
Contributor

Tested this locally in my demo repo, seems to work as intended, nice! 🚀

@jamesparkes
Copy link

make it so

@hotmeteor
Copy link

@joetannenbaum @reinink Would love a merge on this little guy

@hschimpf
Copy link

hschimpf commented Nov 29, 2024

I was debugging my app because I was seeing extra hits to the database, then I found this exact behavior.

We really want this sneaky critter merged #up 🚀

edit: branch tested and works! thanks @joetannenbaum

@joetannenbaum joetannenbaum merged commit f557ed3 into 2.x Dec 3, 2024
24 checks passed
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

Successfully merging this pull request may close these issues.

5 participants