Skip to content

Allow AlwaysProp #76

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Allow AlwaysProp #76

wants to merge 4 commits into from

Conversation

salernosimone
Copy link

The Laravel adapter has a Inertia::always method to always include data (on standard visits and on partial reloads without being explicitly requested). This pull request implements it.

@BrandonShar
Copy link
Collaborator

Thanks @salernosimone this looks good! Would you be able to add a test for the new behavior?

@salernosimone
Copy link
Author

I'll try

@BrandonShar
Copy link
Collaborator

I’m happy to help if you’d like!

inertia/http.py Outdated
@@ -92,14 +92,20 @@ def build_props(self):
**(self.request.inertia),
**self.props,
}
delete_queue = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be a set() instead of an ordered list.

Copy link
Contributor

@akx akx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv.lock shouldn't probably be added here :)

@salernosimone
Copy link
Author

I added 2 test cases.

Co-authored-by: Aarni Koskela <[email protected]>
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.

3 participants