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

[Bug]: Field visibility in create is not working properly #1709

Open
SophiseTech opened this issue Sep 3, 2024 · 1 comment
Open

[Bug]: Field visibility in create is not working properly #1709

SophiseTech opened this issue Sep 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@SophiseTech
Copy link

Contact Details

No response

What happened?

When configuring a field in AdminJS to be visible only in the create action by setting isVisible.create: true and isVisible.edit: false, the field does not appear in the create form. However, if isVisible.edit: true is also set, the field becomes visible in the create form. This behavior suggests that the visibility of fields in the create form is incorrectly linked to the edit form's visibility setting.

Bug prevalence

Whenever i visit the page

AdminJS dependencies version

"@adminjs/express": "^6.1.0",
"@adminjs/mongoose": "^4.1.0",
"@adminjs/upload": "^4.0.2",

What browsers do you see the problem on?

No response

Relevant log output

No response

Relevant code that's giving you issues

resources: [
    {
      resource: User,
      options: {
        properties: {
          resetToken: { isVisible: false },
          resetExpires: { isVisible: false },
          profileImage: { isVisible: false },
          status: { isVisible: false },
          createdAt: { isVisible: showListHideRest },
          password: { isVisible: { create: true, show: false, edit: false, list: false, filter: false } }
        }
      }
    },
]
@SophiseTech SophiseTech added the bug Something isn't working label Sep 3, 2024
@dziraf
Copy link
Contributor

dziraf commented Sep 3, 2024

isVisible doesn't have a create setting. new and edit forms currently share configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants