-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for scalar array #389
Conversation
🦋 Changeset detectedLatest commit: 7384ece The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hey @foyarash, first of all thanks for the quick response to the issue and for this PR. It's looking really good. I tried some things last Friday, and did a similar approach than what you did here with the separation of different cases in the One thing that I was noticing that it can be added (maybe you prefer to do it in another PR with a separate issue, or I can even help you adding it) is the support for array of enums. What I saw is that we can add it as well to the if (dmmfField?.kind === "enum" && dmmfField?.isList) Then, what we really need is a select with the possible enum values. We can even get those enums from the schema by doing Thanks again! :) |
Hello @FacundoSpira Interesting, i actually didnt think about the use case with enums ! This can be part of another PR when this one will be merged. This will require to use the same logic we do in MultiSelectWidget Let me know if you want to work on this stuff ! |
Sure, I'll do it! I'll raise a PR pointing to this one shortly :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, just one thing, in demo example on Post
entity, the tags
fields is required, but there is no error when I submit without any tags
Title
Add support for Prisma scalar array
Type of Change
Issue
#322
Description
Add support for Prisma scalar arrays. Currently supported scalar types are strings and numbers.
In the list, the array is displayed as a count. The PR also includes support search inside the array (case sensitive & exact content as its the only supported way on Prisma)
Screenshots