Best clean way to get rid of the "remove" button on object field

,

As you know the object field type adds a “remove-icon” button in the editing UI of a page.
I certain project that can be confusing and/or dangerous for end-users and we’d prefer only allowing individual edition of subfields in the object and prevent the end user from deleting ALL data from the field with one click.
Is that possible? The Object field documentation does not mention a setting for that so I suppose it does not. What alternative do I have? CSS customization for the panel?

Thanks for you help and suggestions

You are right, there is no option to disable the button.

One workaround would be to hide the button.

As an alternative, you could extend the field and change the Vue part.

Aside from hiding it with panel CSS, you could set the field to required. The end user will then at least not be able to save the empty object field.

I ended up just doing what @thguenther suggested. Setting the field as required at least forbids the end user to save an object field they would have accidentally emptied. Thanks for the idea :+1: