aesmail / kaffy

Powerfully simple admin package for phoenix applications
https://kaffy.fly.dev/admin/
MIT License
1.34k stars 155 forks source link

[BUG] Crash occurs when a schema has a `:page` field or association #290

Open aesmail opened 1 year ago

aesmail commented 1 year ago

Versions Used Kaffy: 0.10.0-rc.2 and master Phoenix: 1.7.7 Elixir: 1.15.5

What's actually happening? On the resource list page, when trying to order a resource by a specific field, if the schema includes a :page field, this might cause a crash or unexpectedly filters the list by :page.

This is happening because Kaffy uses the page query string to provide pagination.

What should happen instead? Kaffy should order the list according to the chosen field without conflicting with predefined parameters used for other functionality.

Screenshots If applicable, add screenshots to help explain your problem.