Skip to content

Commit 1a11661

Browse files
authored
hide the fields sidebar panel if no visible custom fields (#69)
1 parent 048bbb2 commit 1a11661

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

includes/runtime/fields-ui.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ const CreateContentModelFieldsUI = function () {
2424

2525
const fields = contentModelFields.fields;
2626

27-
if ( ! fields ) {
27+
if (
28+
! fields ||
29+
fields.filter( ( field ) => field.visible ).length === 0
30+
) {
2831
return null;
2932
}
3033

0 commit comments

Comments
 (0)