View Source Changelog
2.5.1
Fixed
- Treat Igniter as an optional dependency in the
mix inertia.installtask definition. Previously, compilation would fail if Igniter was not installed.
2.5.0
Added
- Add
inertia_deep_merge/1function to support deep merging props on the client side (https://github.com/inertiajs/inertia/pull/2069) (#54). - Add Igniter installer task (#51).
2.4.0
Added
- Add
inertia_errors/1test helper to fetch Inertia errors (#43).
2.3.0
Added
- Add a
force_inertia_redirectplug function to instruct the client-side to always perform a full browser redirect when a redirect response is sent (#35).
Changed
- Define an
Inertia.Errorsprotocol with default implementations forEcto.ChangesetandMap.
2.2.0
Added
- Add
preserve_casehelper to prevent auto-camelization of specified prop keys. - Add
Inertia.Controller.inertia_response?/1helper to determine if a response is Inertia-rendered.
Fixed
- Ensure prop keys are compared in the proper casing (for partial reloads) when
camelize_propsis enabled. - Fix prop resolution for deferred/optional props.
2.1.0
Fixed
- Include new Inertia v2 attributes in the initial page object (
mergeProps,deferredProps,encryptHistory,clearHistory). - Mark internal component functions in
Inertia.HTMLas private.
2.0.0
Added
- Add support new Inertia.js v2.0.0.
- Add
encrypt_historyfunction to instruct the client-side to encrypt the history entry. - Add
clear_historyfunction to instruct the client-side to clear history. - Add
inertia_optionalfunction, to replace the now-deprecatedinertia_lazyfunction. - Add
inertia_mergefunction to instruct the client-side to merge the prop value with existing data. - Add
inertia_deferfunction to instruct the client-side to fetch the prop value immediately after initial page load.
- Add
- Add helpers for testing Inertia-based controller responses via the
Inertia.Testingmodule. - Add a
camelize_propsglobal config option and acamelize_propsfunction (to use on a per-request basis) to automatically convert prop keys from snake case to camel case. - Accept an
ssroption on therender_inertiafunction.
Changed
- Update Phoenix LiveView to v1.0.
- The errors serializer (for
Ecto.Changesetstructs) has been adjusted to better align with the behavior in the Laravel adapter in cases when there are multiple validation errors for a single field.
Old behavior for errors serializer
Previously, the serializer would include each error under a separate key, with a [0] index suffix, like this:
{
"name[0]": "is too long",
"name[1]": "is not real"
}While this retains maximal information about all the errors for a field, in practice it's difficult to target the right error records for display in the UI.
New behavior for errors serializer
Now, the serializer simply takes the first error message and returns it under the field name, without any added suffix:
{
"name": "is too long"
}Fixed
- Allow for external redirects from
PUT/PATCH/DELETErequests (#22) - Camelize prop names inside lists (e.g.
assign_prop(:items, [%{item_name: "..."}])).
Deprecated
- The
inertia_lazy/1function has been deprecated in favor ofinertia_optional/1
0.10.0
Bug Fixes
- Remove unsupported dot-notation in partial requests (related to inertiajs/inertia-laravel#641)
0.9.0
Bug Fixes
- Fix improper elimination of nested props when using only partials
0.8.0
Features
- Support unicode props (by using the
binaryflag on Node function calls)
0.7.0
Bug Fixes
- Fix exception when assigning structs as prop values (like
DateTime)
0.6.0
Bug Fixes
- Prevent overly greedy empty object elimination (#14)
0.5.0
- Assign errors via an
assign_errorshelper (#10) - Preserve assigned errors across redirects (#10)
- Set up external redirects properly for Inertia requests (#11)
- Pass CSRF tokens via cookies (#12)
- Forward flash contents across forced refreshes (#13)
- Automatically pass Phoenix flash data via the
flashprop
0.4.0
0.3.0
- Add
raise_on_ssr_failureconfiguration
0.2.0
- Add SSR support
- Add
<.inertia_head>component for rendering head elements provided by SSR
0.1.0
- Initial release