Skip to content
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

Custom relationship field view not resolving in Admin UI build #9287

Open
Meetcpatel opened this issue Aug 13, 2024 · 0 comments
Open

Custom relationship field view not resolving in Admin UI build #9287

Meetcpatel opened this issue Aug 13, 2024 · 0 comments

Comments

@Meetcpatel
Copy link
Contributor

When trying to use a custom view for a relationship field in the Admin UI, the build process fails due to a module resolution error. The custom view file is not being correctly resolved during the Next.js build process that Keystone uses for the Admin UI. it works in development mode.

create a custom view, and use it in the schema
like example https://github.com/keystonejs/keystone/blob/main/examples/custom-field-view/schema.ts#L27

agent: relationship({
      ui: {
        labelField: "identityCode",
        displayMode: "select",
        views: "../components/FilteredRelationship.tsx",

it shold build without any error

Screenshot 2024-08-13 at 5 42 17 PM

here is package.json

"dependencies": {
    "@keystone-6/auth": "^7.0.0",
    "@keystone-6/core": "^5.0.0",
    "@keystone-6/document-renderer": "^1.1.2",
    "@keystone-6/fields-document": "^7.0.0",
    "react-infinite-scroll-component": "^6.1.0",
    "slate": "^0.103.0",
    "slate-history": "^0.100.0",
    "slate-react": "^0.107.1",
    "typescript": "^4.9.5",
    "uuid": "^10.0.0"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant