next-admin icon indicating copy to clipboard operation
next-admin copied to clipboard

[FEATURE] - Support Array fields Prisma

Open cregourd opened this issue 1 year ago • 1 comments

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

cregourd avatar May 29 '24 12:05 cregourd

Experiencing this with a array of strings

nahtnam avatar Jun 26 '24 07:06 nahtnam

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

FacundoSpira avatar Aug 30 '24 14:08 FacundoSpira

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 avatar Aug 30 '24 15:08 foyarash

Available in v5.3.0

foyarash avatar Sep 05 '24 13:09 foyarash