getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.32k stars 168 forks source link

Disabled toggle field in object preview can still be changed #6346

Closed bvdputte closed 7 months ago

bvdputte commented 8 months ago

Description

When you have a toggle field in an object field with disabled: true, you can still change it from the object preview.

Expected behavior
That this field would've been disabled there too.

Your setup

Kirby Version
4.1.1

Your system (please complete the following information)

distantnative commented 7 months ago

Currently, the field previews are trying to implement inline editing no matter what. I think each field preview needs a prop that defines whether it's editable or not. We should expose this prop through columns definitions etc. but also ensure to automatically set it to false, e.g. when a field is disabled.