Error When Passing Models with @computed()
or Pagination to Inertia.js
This repository has been created to demonstrate an error that occurs when passing models containing @computed()
or when using pagination with Inertia.js in AdonisJS projects.
Steps to Reproduce the Error:
- Clone this repository to your local environment:
git clone https://github.com/lncitador/computed-and-pagination-error.git
- Navigate to the project directory:
cd computed-and-pagination-error
- Install project dependencies:
npm install
4. Run migrations to create the database schema:
```bash
node ace migration:run
- Run the seeder to generate example data:
node ace db:seed
- Start the AdonisJS server:
node ace serve --watch
- Open your browser and navigate to
http://localhost:3333
to view the application.
Note:
You will notice that when attempting to pass models containing @computed()
or when using pagination, an error occurs within the @adonisjs/inertiajs
package.
Feel free to explore the source code and contribute to a potential solution.
If you need further information or assistance, please don't hesitate to reach out.
Thank you for your collaboration!
Best regards, Walaff Fernandes