Error passing model with @computed() or pagination to Inertia.js #19
ā Type of change
[x] š Bug fix (a non-breaking change that fixes an issue)
[x] š Enhancement (improving an existing functionality like performance)
[ ] āØ New feature (a non-breaking change that adds functionality)
[ ] ā ļø Breaking change (fix or feature that would cause existing functionality to change)
š Description
Hello team,
I would like to report a problem I have encountered when dealing with models that contain @computed() or when passing pagination to Inertia.js in my project. When doing so, an error occurs within the @adonisjs/inertiajs package.
To resolve this issue in my project, I developed a serialization method before passing the data to Inertia.js. This approach allowed me to reprocess the data or send it to the browser without encountering the aforementioned error.
In addition, I took the opportunity to update a type I had created for a provider previously used with @pyxlab/adonis-trpc in Adonis. I modified the return from InferPageProps to return Infer instead of Serialize. This was done because the Serialize type only returned ModelObject when a model was passed in.
I'm happy to provide more details or help you solve this problem.
š Linked issue
Error passing model with @computed() or pagination to Inertia.js #19
ā Type of change
š Description
Hello team,
I would like to report a problem I have encountered when dealing with models that contain
@computed()
or when passing pagination to Inertia.js in my project. When doing so, an error occurs within the @adonisjs/inertiajs package.To resolve this issue in my project, I developed a serialization method before passing the data to Inertia.js. This approach allowed me to reprocess the data or send it to the browser without encountering the aforementioned error.
In addition, I took the opportunity to update a type I had created for a provider previously used with
@pyxlab/adonis-trpc
in Adonis. I modified the return from InferPageProps to return Infer instead of Serialize. This was done because the Serialize type only returned ModelObject when a model was passed in.I'm happy to provide more details or help you solve this problem.