design-system icon indicating copy to clipboard operation
design-system copied to clipboard

Content-type builder - boolean values are clearable when isEditable is false

Open Kyle772 opened this issue 2 years ago • 1 comments

Bug report

Required System information

  • Node.js version: Node v16
  • NPM version: 8.4.0
  • Strapi version: Strapi v4.2
  • Database: postgres
  • Operating system: Debian

Describe the bug

If you set the view for a model in the content-type builder to have isEditable: false on a boolean entry you can still clear the value

Steps to reproduce the behavior

  1. Go to a collection
  2. Click on configure the view
  3. Scroll down to boolean value
  4. set isEditable to false
  5. See error

Expected behavior

The component correctly prevents changes on the toggle but the clear button is still rendered despite the above configuration.

Screenshots

image

Kyle772 avatar Aug 02 '22 18:08 Kyle772

I've discussed the issue with @maevalienard and we will go for hiding the "Clear" action, if the field is disabled.

gu-stav avatar Aug 05 '22 09:08 gu-stav