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

Admin UI: cannot override inherited field with hidden:true #4973

Open
dfinton opened this issue Oct 21, 2019 · 0 comments
Open

Admin UI: cannot override inherited field with hidden:true #4973

dfinton opened this issue Oct 21, 2019 · 0 comments

Comments

@dfinton
Copy link

dfinton commented Oct 21, 2019

Expected behavior

When inheriting from a parent list, some fields may need to be hidden in some of the children.

This appears to be the same issue that was opened back in 2016 that was later resolved. So the behavior we're seeing is almost definitely a regression: keystonejs/keystone#2941

Actual/Current behavior

Other properties, like noedit, initial, default, required can all be overridden just by re-add the field with the same name in the child list. the hidden field, no matter what we do, does not appear to force the UI to not display the field.

Steps to reproduce the actual/current behavior

Pseudo code:

parent.add({
  type: Types.Datetime,
  utc: true,
  format: 'YYYY-MM-DD',
  default: new Date(),
  required: true,
  initial: true,
});

child.add({
  type: Types.Datetime,
  utc: true,
  format: 'YYYY-MM-DD',
  required: false,
  initial: false,
  hidden: true,
  noedit: true,
});

I did some testing with Types.Text type fields just to see if it was specifically related to the DateTime fields, but the problem is reproducible independent of field type based on my limited testing.

Environment

Software Version
Keystone 4.2.1
Node.js 10.15.3 (other LTS versions also show same behavior)
Browser Chrome/Firefox, latest versions
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