firecmsco / firecms

Awesome Firebase/Firestore-based CMS. The missing admin panel for your Firebase project!
https://firecms.co
Other
1.15k stars 184 forks source link

Disabled and hidden field doesn't show in collection view if set in propertiesOrder #551

Closed faizanabidnaqvi closed 11 months ago

faizanabidnaqvi commented 1 year ago

Hi there

I have a field that I wish to hide in the form view but show it in the collection view. This was accomplished in v1, by setting disabled: {hidden: true} But still adding it to the properties list in buildCollection.

In v2, I have the field hidden as well (from property config) and added its key to propertiesOrder in buildCollection but the field doesn't show at all in collection view.

The reason to have this is because I have some fields used to filter in collection view but those fields are auto set and should not show in the form.

The docs for propertiesOrder says: Note that if you set this prop, other ways to hide fields, like hidden in the property definition, will not work.

But seems like hidden in property definition does work even if a property is added in propertiesOrder.

In general, the use case I am looking for is hiding and disabling a field in the form view but still showing it in the collection view.

fgatti675 commented 1 year ago

Fixed in version 2.2.0-pre. Could you confirm this is working?

faizanabidnaqvi commented 1 year ago

I can confirm that this is fixed in 2.2.0-pre.

However, I'll suggest updating the docs for propertiesOrder in collection to be clear. It says: Note that if you set this prop, other ways to hide fields, like hidden in the property definition, will not work.

It should clarify that adding in propertiesOrder will show it in collection view but respect the hidden in form view.

fgatti675 commented 11 months ago

Fixed in version 2.2.0 :)