premieroctet / next-admin

▲ Full-featured admin for Next.js and Prisma
https://next-admin.js.org
MIT License
288 stars 12 forks source link

[FEATURE] - Support Array fields Prisma #322

Closed cregourd closed 3 weeks ago

cregourd commented 4 months ago

Summary

Allow the use of list type in the Prisma model. Currently, arrays are used to represent relationships in forms. However, Prisma allows users to create scalar lists. Find a way to distinguish between relationship arrays and scalar lists.

Basic Example

Imagine a Post which has a tags property as a list of strings. This feature allows you to order/add/remove tags for a Post

Drawbacks

No response

Unresolved questions

No response

nahtnam commented 3 months ago

Experiencing this with a array of strings

FacundoSpira commented 1 month ago

Hey @cregourd, is there any estimation on when this will be added? Or any way we can help?

It's a pretty common use case to have a scalar list. Then, since we can't even override the input itself, we are forced to create a lot of custom pages

foyarash commented 1 month ago

Hello @FacundoSpira I can start having a look next week depending on the time I have, but feel free to open a PR if you want !

foyarash commented 3 weeks ago

Available in v5.3.0